Add support for float data type.
This commit is contained in:
parent
b496b10578
commit
e4160442c8
@ -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"
|
||||||
|
@ -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)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user