summaryrefslogtreecommitdiff
path: root/sqlite.zig
diff options
context:
space:
mode:
Diffstat (limited to 'sqlite.zig')
-rw-r--r--sqlite.zig14
1 files changed, 7 insertions, 7 deletions
diff --git a/sqlite.zig b/sqlite.zig
index 81c9e43..fe44db2 100644
--- a/sqlite.zig
+++ b/sqlite.zig
@@ -196,18 +196,18 @@ pub fn Iterator(comptime Type: type) type {
196 switch (Type) { 196 switch (Type) {
197 []const u8, []u8 => { 197 []const u8, []u8 => {
198 debug.assert(columns == 1); 198 debug.assert(columns == 1);
199 return try self.readBytes(Type, options, .Text, 0); 199 return try self.readBytes(Type, 0, options, .Text);
200 }, 200 },
201 Blob => { 201 Blob => {
202 debug.assert(columns == 1); 202 debug.assert(columns == 1);
203 var ret: Type = undefined; 203 var ret: Type = undefined;
204 ret.data = try self.readBytes([]const u8, options, .Blob, 0); 204 ret.data = try self.readBytes([]const u8, 0, options, .Blob);
205 return ret; 205 return ret;
206 }, 206 },
207 Text => { 207 Text => {
208 debug.assert(columns == 1); 208 debug.assert(columns == 1);
209 var ret: Type = undefined; 209 var ret: Type = undefined;
210 ret.data = try self.readBytes([]const u8, options, .Text, 0); 210 ret.data = try self.readBytes([]const u8, 0, options, .Text);
211 return ret; 211 return ret;
212 }, 212 },
213 else => {}, 213 else => {},
@@ -292,7 +292,7 @@ pub fn Iterator(comptime Type: type) type {
292 Text, 292 Text,
293 }; 293 };
294 294
295 fn readBytes(self: *Self, comptime BytesType: type, options: anytype, mode: ReadBytesMode, _i: usize) !BytesType { 295 fn readBytes(self: *Self, comptime BytesType: type, _i: usize, options: anytype, mode: ReadBytesMode) !BytesType {
296 const i = @intCast(c_int, _i); 296 const i = @intCast(c_int, _i);
297 switch (mode) { 297 switch (mode) {
298 .Blob => { 298 .Blob => {
@@ -325,13 +325,13 @@ pub fn Iterator(comptime Type: type) type {
325 325
326 switch (field.field_type) { 326 switch (field.field_type) {
327 []const u8, []u8 => { 327 []const u8, []u8 => {
328 @field(value, field.name) = try self.readBytes(field.field_type, options, .Blob, i); 328 @field(value, field.name) = try self.readBytes(field.field_type, i, options, .Blob);
329 }, 329 },
330 Blob => { 330 Blob => {
331 @field(value, field.name).data = try self.readBytes([]const u8, options, .Blob, i); 331 @field(value, field.name).data = try self.readBytes([]const u8, i, options, .Blob);
332 }, 332 },
333 Text => { 333 Text => {
334 @field(value, field.name).data = try self.readBytes([]const u8, options, .Text, i); 334 @field(value, field.name).data = try self.readBytes([]const u8, i, options, .Text);
335 }, 335 },
336 else => switch (field_type_info) { 336 else => switch (field_type_info) {
337 .Int => { 337 .Int => {