summaryrefslogtreecommitdiff
path: root/query.zig
diff options
context:
space:
mode:
authorGravatar Vincent Rischmann2021-04-27 21:05:10 +0200
committerGravatar Vincent Rischmann2021-04-27 21:31:25 +0200
commit90e9525b3873a1dad782a25d9cde3565520b9e2b (patch)
tree79205553b3ff2454e97a6931df860858e31f5272 /query.zig
parentfix error name (diff)
downloadzig-sqlite-90e9525b3873a1dad782a25d9cde3565520b9e2b.tar.gz
zig-sqlite-90e9525b3873a1dad782a25d9cde3565520b9e2b.tar.xz
zig-sqlite-90e9525b3873a1dad782a25d9cde3565520b9e2b.zip
workaround compiler bug
This workaround allows one to write this: const Foobar = struct { foo: usize, bar: []const u8, }; const row = try stmt.one(Foobar); Where the first field in the struct (here `foo`) is either an integer type, a float type or a boolean. Moving the first field of this type to second position resolves the bug. This is because readInt, readFloat and readBool have an empty error set and cause this bug to trigger. Removing the error altogether also triggers the bug so we define an explicit error set. If we actually want to return an error from these functions we'll simply remove the workaround. See https://github.com/ziglang/zig/issues/5149
Diffstat (limited to 'query.zig')
0 files changed, 0 insertions, 0 deletions