From 717cc7660d31a423dc2572002725a24094b85a00 Mon Sep 17 00:00:00 2001 From: totoro Date: Thu, 9 Mar 2017 17:51:03 +0100 Subject: [PATCH] add bind_DB_id_or_NULL --- database/db_utils.anubis | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/database/db_utils.anubis b/database/db_utils.anubis index e3dd197..3db732d 100644 --- a/database/db_utils.anubis +++ b/database/db_utils.anubis @@ -304,7 +304,21 @@ public define (List(SQLite3Bind), String) extended version of bind for SQLite3. - + +public define SQLite3Bind + bind_DB_id_or_NULL + ( + String _name, + DB_id _value + )= + if _value is + { + none then bind_NULL(_name) + db_id(value) then bind_Int(_name, value) + } +. + + public define SQLite3Bind bind_Int_or_NULL ( -- libgit2 0.21.4