From 9b1eef7fd9ffd56595900dfa7fa2b03d6f9a5560 Mon Sep 17 00:00:00 2001 From: Constantine Molchanov Date: Tue, 30 Jan 2024 22:29:10 +0400 Subject: [PATCH] Fix dbValue resolution for Nim devel. --- src/norm/private/postgres/dbtypes.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/norm/private/postgres/dbtypes.nim b/src/norm/private/postgres/dbtypes.nim index 7ece148f..c378a7e6 100644 --- a/src/norm/private/postgres/dbtypes.nim +++ b/src/norm/private/postgres/dbtypes.nim @@ -44,6 +44,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*[T: Model](val: T): DbValue = dbValue(val.id) func dbValue*[T: Model](val: Option[T]): DbValue =