summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vincent Rischmann2021-11-22 23:21:01 +0100
committerGravatar Vincent Rischmann2021-11-22 23:34:41 +0100
commit3dc73fbe5bbe043e31b12637cb693b9bf6ceba95 (patch)
treee99ac13ef7635d7ffe9c5ed9f995c7bde81e2ea0
parentdynamic statement: document bind() (diff)
downloadzig-sqlite-3dc73fbe5bbe043e31b12637cb693b9bf6ceba95.tar.gz
zig-sqlite-3dc73fbe5bbe043e31b12637cb693b9bf6ceba95.tar.xz
zig-sqlite-3dc73fbe5bbe043e31b12637cb693b9bf6ceba95.zip
dynamic statement: fix documentation
Diffstat (limited to '')
-rw-r--r--sqlite.zig8
1 files changed, 5 insertions, 3 deletions
diff --git a/sqlite.zig b/sqlite.zig
index 9adc070..97241e9 100644
--- a/sqlite.zig
+++ b/sqlite.zig
@@ -1208,9 +1208,11 @@ pub const StatementOptions = struct {};
1208/// const stmt = "SELECT email FROM users WHERE name = ? AND password = ?"; 1208/// const stmt = "SELECT email FROM users WHERE name = ? AND password = ?";
1209/// const row = try stmt.one(Row, .{"Tankman", "Passw0rd"}); 1209/// const row = try stmt.one(Row, .{"Tankman", "Passw0rd"});
1210/// 1210///
1211/// TODO(vincent): clarify the following 1211/// You can only mix named and unnamed bind markers if:
1212/// Named and unnamed markers could not be mixed, functions might be failed in slient. 1212/// * the bind values data is a tuple (without field names)
1213/// (Just like sqlite3's sqlite3_stmt, the unbinded values will be treated as NULL.) 1213/// * the bind values data is a struct with the same field orders as in the query
1214/// This is because with a unnamed bind markers we use the field index in the struct as bind column; if the fields
1215/// are in the wrong order the query will not work correctly.
1214/// 1216///
1215pub const DynamicStatement = struct { 1217pub const DynamicStatement = struct {
1216 db: *c.sqlite3, 1218 db: *c.sqlite3,