diff options
| author | 2024-12-11 23:54:18 -0500 | |
|---|---|---|
| committer | 2024-12-11 23:54:18 -0500 | |
| commit | eafe50fbf07388c03d6e052031296265bbc55643 (patch) | |
| tree | 6ae9de96dc0dfad238461807cc1f74366d647487 /README.md | |
| parent | bump version to 3.47.2 (diff) | |
| download | zig-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.md | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -227,8 +227,8 @@ const row = try stmt.one( | |||
| 227 | .{}, | 227 | .{}, |
| 228 | .{ .id = 20 }, | 228 | .{ .id = 20 }, |
| 229 | ); | 229 | ); |
| 230 | if (row) |row| { | 230 | if (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 | ``` |
| 234 | Notice 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. | 234 | Notice 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. |