Add support for float data type.

This commit is contained in:
Jonathan Bernard 2020-02-16 21:50:43 -06:00
parent b496b10578
commit e4160442c8
2 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,6 @@
# Package # Package
version = "0.2.0" version = "0.3.0"
author = "Jonathan Bernard" author = "Jonathan Bernard"
description = "Lightweight Postgres ORM for Nim." description = "Lightweight Postgres ORM for Nim."
license = "GPL-3.0" license = "GPL-3.0"

View File

@ -197,6 +197,9 @@ proc createParseStmt*(t, value: NimNode): NimNode =
elif t.typeKind == ntyInt: elif t.typeKind == ntyInt:
result = quote do: parseInt(`value`) result = quote do: parseInt(`value`)
elif t.typeKind == ntyFloat:
result = quote do: parseFloat(`value`)
elif t.typeKind == ntyBool: elif t.typeKind == ntyBool:
result = quote do: "true".startsWith(`value`.toLower) result = quote do: "true".startsWith(`value`.toLower)