summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md7
1 files changed, 5 insertions, 2 deletions
diff --git a/README.md b/README.md
index ff070eb..e24f2d6 100644
--- a/README.md
+++ b/README.md
@@ -277,8 +277,10 @@ Here are the rules for bind parameters:
277* any Zig `Int` or `ComptimeInt` is treated as a `INTEGER`. 277* any Zig `Int` or `ComptimeInt` is treated as a `INTEGER`.
278* any Zig `Float` or `ComptimeFloat` is treated as a `REAL`. 278* any Zig `Float` or `ComptimeFloat` is treated as a `REAL`.
279* `[]const u8`, `[]u8` is treated as a `TEXT`. 279* `[]const u8`, `[]u8` is treated as a `TEXT`.
280* The custom `sqlite.Blob` type is treated as a `BLOB`. 280* the custom `sqlite.Blob` type is treated as a `BLOB`.
281* The custom `sqlite.Text` type is treated as a `TEXT`. 281* the custom `sqlite.Text` type is treated as a `TEXT`.
282* the `null` value is treated as a `NULL`.
283* non-null optionals are treated like a regular value, null optionals are treated as a `NULL`.
282 284
283Here are the rules for resultset rows: 285Here are the rules for resultset rows:
284* `INTEGER` can be read into any Zig `Int` provided the data fits. 286* `INTEGER` can be read into any Zig `Int` provided the data fits.
@@ -286,6 +288,7 @@ Here are the rules for resultset rows:
286* `TEXT` can be read into a `[]const u8` or `[]u8`. 288* `TEXT` can be read into a `[]const u8` or `[]u8`.
287* `TEXT` can be read into any array of `u8` with a sentinel provided the data fits. 289* `TEXT` can be read into any array of `u8` with a sentinel provided the data fits.
288* `BLOB` follows the same rules as `TEXT`. 290* `BLOB` follows the same rules as `TEXT`.
291* `NULL` can be read into any optional.
289 292
290Note that arrays must have a sentinel because we need a way to communicate where the data actually stops in the array, so for example use `[200:0]u8` for a `TEXT` field. 293Note that arrays must have a sentinel because we need a way to communicate where the data actually stops in the array, so for example use `[200:0]u8` for a `TEXT` field.
291 294