From 56d67e5d5c3b7fa2c094719757b168c3e5725057 Mon Sep 17 00:00:00 2001 From: Vincent Rischmann Date: Thu, 31 Dec 2020 14:50:12 +0100 Subject: fix readme * we can't actually bind arrays. * arrays require a sentinel --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cdebc3c..dea6990 100644 --- a/README.md +++ b/README.md @@ -251,7 +251,7 @@ Since sqlite doesn't have many [types](https://www.sqlite.org/datatype3.html) on Here are the rules for bind parameters: * any Zig `Int` or `ComptimeInt` is tread as a `INTEGER`. * any Zig `Float` or `ComptimeFloat` is treated as a `REAL`. -* `[]const u8`, `[]u8` or any array of `u8` is treated as a `TEXT`. +* `[]const u8`, `[]u8` is treated as a `TEXT`. * The custom `sqlite.Blob` type is treated as a `BLOB`. * The custom `sqlite.Text` type is treated as a `TEXT`. @@ -259,7 +259,7 @@ Here are the rules for resultset rows: * `INTEGER` can be read into any Zig `Int` provided the data fits. * `REAL` can be read into any Zig `Float` provided the data fits. * `TEXT` can be read into a `[]const u8` or `[]u8`. -* `TEXT` can be read into any array of `u8` provided the data fits. +* `TEXT` can be read into any array of `u8` with a sentinel provided the data fits. * `BLOB` follows the same rules as `TEXT`. Note 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. -- cgit v1.2.3