diff options
| author | 2021-10-23 14:32:26 +0200 | |
|---|---|---|
| committer | 2021-10-23 16:48:06 +0200 | |
| commit | e9419174015b4dca2b1f4794d55a7cd6ec77273e (patch) | |
| tree | 3d9c861e7a336cd7b17ad3d16bc9f0ed52e95200 /query.zig | |
| parent | query: use a switch instead of if/else chains (diff) | |
| download | zig-sqlite-e9419174015b4dca2b1f4794d55a7cd6ec77273e.tar.gz zig-sqlite-e9419174015b4dca2b1f4794d55a7cd6ec77273e.tar.xz zig-sqlite-e9419174015b4dca2b1f4794d55a7cd6ec77273e.zip | |
query: no need to use comptimePrint
Diffstat (limited to 'query.zig')
| -rw-r--r-- | query.zig | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -94,7 +94,7 @@ pub const ParsedQuery = struct { | |||
| 94 | 94 | ||
| 95 | // A bind marker with id and type: ?AAA{[]const u8}, we don't need move the pointer. | 95 | // A bind marker with id and type: ?AAA{[]const u8}, we don't need move the pointer. |
| 96 | if (current_bind_marker_id_pos > 0) { | 96 | if (current_bind_marker_id_pos > 0) { |
| 97 | parsed_query.bind_markers[parsed_query.nb_bind_markers].identifier = std.fmt.comptimePrint("{s}", .{current_bind_marker_id[0..current_bind_marker_id_pos]}); | 97 | parsed_query.bind_markers[parsed_query.nb_bind_markers].identifier = current_bind_marker_id[0..current_bind_marker_id_pos]; |
| 98 | } | 98 | } |
| 99 | }, | 99 | }, |
| 100 | else => { | 100 | else => { |
| @@ -104,7 +104,7 @@ pub const ParsedQuery = struct { | |||
| 104 | } else { | 104 | } else { |
| 105 | state = .Start; | 105 | state = .Start; |
| 106 | if (current_bind_marker_id_pos > 0) { | 106 | if (current_bind_marker_id_pos > 0) { |
| 107 | parsed_query.bind_markers[parsed_query.nb_bind_markers].identifier = std.fmt.comptimePrint("{s}", .{current_bind_marker_id[0..current_bind_marker_id_pos]}); | 107 | parsed_query.bind_markers[parsed_query.nb_bind_markers].identifier = current_bind_marker_id[0..current_bind_marker_id_pos]; |
| 108 | } | 108 | } |
| 109 | } | 109 | } |
| 110 | buf[pos] = c; | 110 | buf[pos] = c; |
| @@ -138,7 +138,7 @@ pub const ParsedQuery = struct { | |||
| 138 | parsed_query.nb_bind_markers += 1; | 138 | parsed_query.nb_bind_markers += 1; |
| 139 | }, | 139 | }, |
| 140 | .BindMarkerIdentifier => { | 140 | .BindMarkerIdentifier => { |
| 141 | parsed_query.bind_markers[parsed_query.nb_bind_markers].identifier = std.fmt.comptimePrint("{s}", .{current_bind_marker_id[0..current_bind_marker_id_pos]}); | 141 | parsed_query.bind_markers[parsed_query.nb_bind_markers].identifier = current_bind_marker_id[0..current_bind_marker_id_pos]; |
| 142 | parsed_query.nb_bind_markers += 1; | 142 | parsed_query.nb_bind_markers += 1; |
| 143 | }, | 143 | }, |
| 144 | .Start => {}, | 144 | .Start => {}, |