File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ pub fn ParsedQuery(comptime tmp_query: []const u8) type {
56
56
// This holds the starting character of the string while
57
57
// state is .inside_string so that we know which type of
58
58
// string we're exiting from
59
- var string_starting_character : ? u8 = null ;
59
+ var string_starting_character : u8 = undefined ;
60
60
61
61
var current_bind_marker_type : [256 ]u8 = undefined ;
62
62
var current_bind_marker_type_pos = 0 ;
@@ -452,6 +452,11 @@ test "parsed query: bind marker character inside string" {
452
452
.exp_bind_markers = 1 ,
453
453
.exp = "SELECT json_extract(metadata, '$.name') AS name FROM foobar WHERE name = $name" ,
454
454
},
455
+ .{
456
+ .query = "SELECT json_extract(metadata, '$[0]') AS name FROM foobar" ,
457
+ .exp_bind_markers = 0 ,
458
+ .exp = "SELECT json_extract(metadata, '$[0]') AS name FROM foobar" ,
459
+ },
455
460
};
456
461
457
462
inline for (testCases ) | tc | {
You can’t perform that action at this time.
0 commit comments