diff options
Diffstat (limited to '')
| -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. |