Skip to content

Commit

Permalink
Fix dbValue resolution for Nim devel.
Browse files Browse the repository at this point in the history
  • Loading branch information
moigagoo committed Jan 30, 2024
1 parent 85313e9 commit 6acd438
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/norm/private/sqlite/dbtypes.nim
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ func dbType*[T](_: typedesc[Option[T]]): string = dbType T

# Converter funcs from Nim values to ``DbValue``:

func dbValue*(val: typeof(nil)): DbValue = DbValue(kind: dvkNull)

func dbValue*(val: bool): DbValue = dbValue(if val: 1 else: 0)

func dbValue*(val: DateTime): DbValue = dbValue(val.toTime().toUnixFloat())
Expand Down

0 comments on commit 6acd438

Please sign in to comment.