diff options
| author | 2022-08-05 21:14:27 +0200 | |
|---|---|---|
| committer | 2022-08-05 21:15:49 +0200 | |
| commit | 2b3b035e36f0de6cb6fc839ba0fb9bed533ba597 (patch) | |
| tree | e161eceea99f77990a4c8dc5bc1f3f963c7c057a | |
| parent | move DetailedError, do some cleanup (diff) | |
| download | zig-sqlite-2b3b035e36f0de6cb6fc839ba0fb9bed533ba597.tar.gz zig-sqlite-2b3b035e36f0de6cb6fc839ba0fb9bed533ba597.tar.xz zig-sqlite-2b3b035e36f0de6cb6fc839ba0fb9bed533ba597.zip | |
move Text in sqlite.zig
At first Blob and Text were defined in query.zig because they were used
for bind parameters, but now we also use them for reading text or blob
columns appropriately.
Both types now live in sqlite.zig which query.zig already imports so it
doesn't change anything.
Diffstat (limited to '')
| -rw-r--r-- | query.zig | 4 | ||||
| -rw-r--r-- | sqlite.zig | 4 |
2 files changed, 4 insertions, 4 deletions
| @@ -3,9 +3,7 @@ const mem = std.mem; | |||
| 3 | const testing = std.testing; | 3 | const testing = std.testing; |
| 4 | 4 | ||
| 5 | const Blob = @import("sqlite.zig").Blob; | 5 | const Blob = @import("sqlite.zig").Blob; |
| 6 | 6 | const Text = @import("sqlite.zig").Text; | |
| 7 | /// Text is used to represent a SQLite TEXT value when binding a parameter or reading a column. | ||
| 8 | pub const Text = struct { data: []const u8 }; | ||
| 9 | 7 | ||
| 10 | const BindMarker = struct { | 8 | const BindMarker = struct { |
| 11 | /// Contains the expected type for a bind parameter which will be checked | 9 | /// Contains the expected type for a bind parameter which will be checked |
| @@ -9,7 +9,6 @@ const testing = std.testing; | |||
| 9 | 9 | ||
| 10 | const c = @import("c.zig").c; | 10 | const c = @import("c.zig").c; |
| 11 | 11 | ||
| 12 | pub const Text = @import("query.zig").Text; | ||
| 13 | pub const ParsedQuery = @import("query.zig").ParsedQuery; | 12 | pub const ParsedQuery = @import("query.zig").ParsedQuery; |
| 14 | 13 | ||
| 15 | const errors = @import("errors.zig"); | 14 | const errors = @import("errors.zig"); |
| @@ -21,6 +20,9 @@ const getDetailedErrorFromResultCode = errors.getDetailedErrorFromResultCode; | |||
| 21 | 20 | ||
| 22 | const logger = std.log.scoped(.sqlite); | 21 | const logger = std.log.scoped(.sqlite); |
| 23 | 22 | ||
| 23 | /// Text is used to represent a SQLite TEXT value when binding a parameter or reading a column. | ||
| 24 | pub const Text = struct { data: []const u8 }; | ||
| 25 | |||
| 24 | /// ZeroBlob is a blob with a fixed length containing only zeroes. | 26 | /// ZeroBlob is a blob with a fixed length containing only zeroes. |
| 25 | /// | 27 | /// |
| 26 | /// A ZeroBlob is intended to serve as a placeholder; content can later be written with incremental i/o. | 28 | /// A ZeroBlob is intended to serve as a placeholder; content can later be written with incremental i/o. |