diff options
| author | 2021-08-09 01:18:22 -0700 | |
|---|---|---|
| committer | 2021-08-09 01:18:22 -0700 | |
| commit | 1e203086c5be85a3a77e630b1844ea39115d8276 (patch) | |
| tree | 631b06d7fb7328259b18756cd3081424588d3007 | |
| parent | options asks for `allocator` field but its not there (diff) | |
| download | zig-sqlite-1e203086c5be85a3a77e630b1844ea39115d8276.tar.gz zig-sqlite-1e203086c5be85a3a77e630b1844ea39115d8276.tar.xz zig-sqlite-1e203086c5be85a3a77e630b1844ea39115d8276.zip | |
clarify bind marker len compile error
Diffstat (limited to '')
| -rw-r--r-- | sqlite.zig | 5 |
1 files changed, 4 insertions, 1 deletions
| @@ -997,7 +997,10 @@ pub fn Statement(comptime opts: StatementOptions, comptime query: ParsedQuery) t | |||
| 997 | const StructTypeInfo = @typeInfo(StructType).Struct; | 997 | const StructTypeInfo = @typeInfo(StructType).Struct; |
| 998 | 998 | ||
| 999 | if (comptime query.nb_bind_markers != StructTypeInfo.fields.len) { | 999 | if (comptime query.nb_bind_markers != StructTypeInfo.fields.len) { |
| 1000 | @compileError("number of bind markers not equal to number of fields"); | 1000 | @compileError(comptime std.fmt.comptimePrint("number of bind markers ({d}) not equal to number of fields ({d})", .{ |
| 1001 | query.nb_bind_markers, | ||
| 1002 | StructTypeInfo.fields.len, | ||
| 1003 | })); | ||
| 1001 | } | 1004 | } |
| 1002 | 1005 | ||
| 1003 | inline for (StructTypeInfo.fields) |struct_field, _i| { | 1006 | inline for (StructTypeInfo.fields) |struct_field, _i| { |