diff options
| author | 2022-05-24 00:49:28 +0200 | |
|---|---|---|
| committer | 2022-05-24 00:49:28 +0200 | |
| commit | f32017ea460d00f0dd3ac134f64131a1dab93b44 (patch) | |
| tree | 0e0a43a2e9170c8f2007bfbd157aa188d94fe2b0 | |
| parent | Make ParsedQuery a generic on query length (diff) | |
| parent | clarify the compile error (diff) | |
| download | zig-sqlite-f32017ea460d00f0dd3ac134f64131a1dab93b44.tar.gz zig-sqlite-f32017ea460d00f0dd3ac134f64131a1dab93b44.tar.xz zig-sqlite-f32017ea460d00f0dd3ac134f64131a1dab93b44.zip | |
Merge branch 'clarify-bind-markers-error'
Diffstat (limited to '')
| -rw-r--r-- | sqlite.zig | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -2054,7 +2054,7 @@ pub fn Statement(comptime opts: StatementOptions, comptime query: anytype) type | |||
| 2054 | const StructTypeInfo = @typeInfo(StructType).Struct; | 2054 | const StructTypeInfo = @typeInfo(StructType).Struct; |
| 2055 | 2055 | ||
| 2056 | if (comptime query.nb_bind_markers != StructTypeInfo.fields.len) { | 2056 | if (comptime query.nb_bind_markers != StructTypeInfo.fields.len) { |
| 2057 | @compileError(comptime std.fmt.comptimePrint("number of bind markers ({d}) not equal to number of fields ({d})", .{ | 2057 | @compileError(comptime std.fmt.comptimePrint("expected {d} bind parameters but got {d}", .{ |
| 2058 | query.nb_bind_markers, | 2058 | query.nb_bind_markers, |
| 2059 | StructTypeInfo.fields.len, | 2059 | StructTypeInfo.fields.len, |
| 2060 | })); | 2060 | })); |