Commit 717cc7660d31a423dc2572002725a24094b85a00

Authored by totoro
1 parent 5b85c04c

add bind_DB_id_or_NULL

Showing 1 changed file with 15 additions and 1 deletions   Show diff stats
database/db_utils.anubis
@@ -304,7 +304,21 @@ public define (List(SQLite3Bind), String) @@ -304,7 +304,21 @@ public define (List(SQLite3Bind), String)
304 304
305 305
306 extended version of bind for SQLite3. 306 extended version of bind for SQLite3.
307 - 307 +
  308 +public define SQLite3Bind
  309 + bind_DB_id_or_NULL
  310 + (
  311 + String _name,
  312 + DB_id _value
  313 + )=
  314 + if _value is
  315 + {
  316 + none then bind_NULL(_name)
  317 + db_id(value) then bind_Int(_name, value)
  318 + }
  319 +.
  320 +
  321 +
308 public define SQLite3Bind 322 public define SQLite3Bind
309 bind_Int_or_NULL 323 bind_Int_or_NULL
310 ( 324 (