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