| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
Missed one
|
| | |
|
| |
|
|
| |
workaround for https://github.com/ziglang/zig/issues/16663
|
| |
|
| |
Statement.all already does
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Now the correct build APIs and `@memset` builtin are used.
Unfortunately cImport fails for `aarch64` and `riscv64` targets, but
I'm not sure how to fix this.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
See https://github.com/ziglang/zig/pull/13930
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Fixes the following error:
```
sqlite.zig:343:50: error: expected type '[*c]const u8', found '[:0]const u8'
const result = c.sqlite3_open_v2(path, &db, flags, null);
^~~~
```
|
| |
|
|
| |
not needed as we always prepare a dynamic statement
|
| | |
|
| | |
|
| |
|
|
| |
Will be used in the virtual table implementation
|
| |
|
|
| |
This function will also be used by the virtual table implementation.
|
| | |
|
| |
|
|
| |
Necessary for running the tests with eg `-Din_memory=false -Ddbfile=/tmp/my.db`
|
| |
|
|
| |
Accidentally made it private during a refactoring
|
| |
|
|
|
|
|
|
|
|
|
|
| |
After some testing it turns out we need at least SQLite 3.21.0 to
compile.
We _could_ work around this and make zig-sqlite work with older SQLite
versions but I don't think it's necessary because:
* "old" distributions like Debian Buster, RHEL 8 ship with SQLite >
3.21.0
* in any case if people want to build for OSes where SQLite is too old
they can use the bundled source code.
|
| |
|
|
| |
We will need it later on.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
DetailedError uses getLastErrorOffset, which must check the SQLite
version with versionGreaterThanOrEqualTo.
Instead of publicly exposing versionGreaterThanOrEqualTo in sqlite.zig
move DetailedError in errors.zig
|
| |
|
|
|
|
|
|
|
| |
Two cImport calls generate incompatible code: we can't use the structs
generated in sqlite.zig in functions in errors.zig for example
Up until now it wasn't actually a problem since in errors.zig we only
ever used constants which does work, but now we want to introduce
functions in this file.
|
| |
|
|
| |
A comparison against a const is already comptime.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old way of working was that we always passed the user context as
first argument to both `step` and `finalize` functions and the caller
had no way of getting the aggregate context from
SQLite (http://www3.sqlite.org/c3ref/aggregate_context.html).
Now both `step` and `finalize` functions must have a first argument of type `FunctionContext`:
fn step(fctx: FunctionContext, input: u32) void {
var ctx = fctx.aggregateContext(*u32) orelse return;
ctx.* += input;
}
fn finalize(ctx: *u32) u32 {
var ctx = fctx.aggregateContext(*u32) orelse return 0;
return ctx.sum;
}
Fixes #89
|
| | |
|
| | |
|
| |
|
| |
Useful for direct C API users.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|