summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorGravatar Jud Hembree2024-12-11 23:54:18 -0500
committerGravatar Jud Hembree2024-12-11 23:54:18 -0500
commiteafe50fbf07388c03d6e052031296265bbc55643 (patch)
tree6ae9de96dc0dfad238461807cc1f74366d647487 /README.md
parentbump version to 3.47.2 (diff)
downloadzig-sqlite-eafe50fbf07388c03d6e052031296265bbc55643.tar.gz
zig-sqlite-eafe50fbf07388c03d6e052031296265bbc55643.tar.xz
zig-sqlite-eafe50fbf07388c03d6e052031296265bbc55643.zip
fixup README.md
spanZ is no longer in the standard. Found an alternate way to run the example. Updating readme for the next guy.
Diffstat (limited to 'README.md')
-rw-r--r--README.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/README.md b/README.md
index b26708c..4454e9c 100644
--- a/README.md
+++ b/README.md
@@ -227,8 +227,8 @@ const row = try stmt.one(
227 .{}, 227 .{},
228 .{ .id = 20 }, 228 .{ .id = 20 },
229); 229);
230if (row) |row| { 230if (row) |r| {
231 std.log.debug("name: {}, age: {}", .{std.mem.spanZ(&row.name), row.age}); 231 std.log.debug("name: {}, age: {}", .{std.mem.span((&row.name).ptr), row.age});
232} 232}
233``` 233```
234Notice that to read text we need to use a 0-terminated array; if the `name` column is bigger than 127 bytes the call to `one` will fail. 234Notice that to read text we need to use a 0-terminated array; if the `name` column is bigger than 127 bytes the call to `one` will fail.