diff options
| -rw-r--r-- | sqlite.zig | 6 |
1 files changed, 6 insertions, 0 deletions
| @@ -117,6 +117,12 @@ pub const Db = struct { | |||
| 117 | } | 117 | } |
| 118 | }; | 118 | }; |
| 119 | 119 | ||
| 120 | /// Bytes is used to represent a byte slice with its SQLite datatype. | ||
| 121 | /// | ||
| 122 | /// Since Zig doesn't have strings we can't tell if a []u8 must be stored as a SQLite TEXT or BLOB, | ||
| 123 | /// this type can be used to communicate this when executing a statement. | ||
| 124 | /// | ||
| 125 | /// If a []u8 or []const u8 is passed as bind parameter it will be treated as TEXT. | ||
| 120 | pub const Bytes = union(enum) { | 126 | pub const Bytes = union(enum) { |
| 121 | Blob: []const u8, | 127 | Blob: []const u8, |
| 122 | Text: []const u8, | 128 | Text: []const u8, |