summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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.