summaryrefslogtreecommitdiff
path: root/sqlite.zig (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* all: fix tests for latest zigGravatar Vincent Rischmann2021-05-091-77/+77
|
* attempt to make the threading mode error clearerGravatar Vincent Rischmann2021-05-031-1/+1
|
* workaround compiler bugGravatar Vincent Rischmann2021-04-271-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | This workaround allows one to write this: const Foobar = struct { foo: usize, bar: []const u8, }; const row = try stmt.one(Foobar); Where the first field in the struct (here `foo`) is either an integer type, a float type or a boolean. Moving the first field of this type to second position resolves the bug. This is because readInt, readFloat and readBool have an empty error set and cause this bug to trigger. Removing the error altogether also triggers the bug so we define an explicit error set. If we actually want to return an error from these functions we'll simply remove the workaround. See https://github.com/ziglang/zig/issues/5149
* fix error nameGravatar Vincent Rischmann2021-04-231-1/+1
|
* Allow reading into static size arrays as long as size matchesGravatar daurnimator2021-04-231-11/+12
|
* improve logs in Statement.deinit and Statement.resetGravatar Vincent Rischmann2021-04-171-3/+6
|
* fix DetailedError and Diagnostics formattingGravatar Vincent Rischmann2021-04-171-4/+8
|
* replace the pragma argument with a nullable stringGravatar Vincent Rischmann2021-04-171-18/+15
|
* fix documentationGravatar Vincent Rischmann2021-04-171-1/+1
|
* simplify iterator usage in code and docGravatar Vincent Rischmann2021-02-271-10/+5
|
* add DiagnosticsGravatar Vincent Rischmann2021-02-271-11/+130
|
* store the database handle in Iterator and StatementGravatar Vincent Rischmann2021-02-271-0/+4
|
* add Blob.reopenGravatar Vincent Rischmann2021-01-311-17/+53
|
* add incremental i/o on blobGravatar Vincent Rischmann2021-01-311-0/+204
|
* add the Db.getLastInsertRowID methodGravatar Vincent Rischmann2021-01-311-1/+24
|
* rework of the test database initializationGravatar Vincent Rischmann2021-01-241-45/+48
| | | | | | | | The hardcoded path we used is invalid on Windows, instead use a temp directory from std.testing.tmpDir. Need to do some refactoring too because now we compute the database file path and therefore need an allocator while the Mode is in use in Db.init.
* allow binding and reading optionalsGravatar Vincent Rischmann2021-01-061-2/+32
| | | | Also allow binding the '(null)' value.
* add a test for optionalsGravatar Vincent Rischmann2021-01-061-0/+27
|
* fix compile error in readFieldGravatar Vincent Rischmann2021-01-061-1/+1
|
* add a test that reads only pointersGravatar Vincent Rischmann2021-01-061-0/+35
|
* implement reading a value into a one-element pointerGravatar Vincent Rischmann2021-01-061-1/+6
|
* add readFieldGravatar Vincent Rischmann2021-01-061-15/+20
|
* reorder fields to workaround a compiler bugGravatar Vincent Rischmann2021-01-061-17/+17
|
* logging file open {} -> {s}Gravatar Sebastian2021-01-051-1/+1
|
* convert {} to {s} or {d}Gravatar Vincent Rischmann2021-01-031-3/+3
|
* add a test for binding a .One pointerGravatar Vincent Rischmann2021-01-021-0/+22
|
* stop special casing []const u8 and []u8, do it in the .Pointer switch armGravatar Vincent Rischmann2021-01-021-3/+6
|
* allow binding a pointerGravatar Vincent Rischmann2021-01-021-0/+1
|
* add a test that binds a string literalGravatar Vincent Rischmann2021-01-021-0/+20
|
* add bindFieldGravatar Vincent Rischmann2021-01-021-24/+31
|
* fix the comment on Stmt.one and Stmt.allGravatar Vincent Rischmann2021-01-021-3/+1
|
* fix compile errorGravatar Vincent Rischmann2021-01-011-1/+1
|
* check the weight field tooGravatar Vincent Rischmann2021-01-011-0/+1
|
* fix tests with the new errorsGravatar Vincent Rischmann2020-12-311-2/+2
|
* add proper error typesGravatar Vincent Rischmann2020-12-311-8/+7
| | | | | | | * Add SQLiteError and various SQLiteExtendedXYZError * Replace old errors with the SQLite ones where appropriate Fixes #8
* add pragmaAllocGravatar Vincent Rischmann2020-12-301-21/+43
|
* add more testsGravatar Vincent Rischmann2020-12-301-28/+83
|
* introduce *Alloc methodsGravatar Vincent Rischmann2020-12-301-48/+109
| | | | | | | | | | Stmt.oneAlloc, Db.oneAlloc and Iterator.nextAlloc do the same thing as Stmt.one, Db.one, Iterator.next respectively but they can allocate memory. This is useful when reading TEXT or BLOB columns because if you can't allocate memory the only way to read these types is with an array which means you must have an idea of the maximum size of the column.
* document OpenFlagsGravatar Vincent Rischmann2020-12-301-0/+1
|
* add more tests for failuresGravatar Vincent Rischmann2020-12-301-0/+21
| | | | | * one for Db.init * one for Db.prepare
* remove loggingGravatar Vincent Rischmann2020-12-301-3/+0
|
* add Error, DetailedErrorGravatar Vincent Rischmann2020-12-301-0/+33
|
* document ThreadingMode and InitOptionsGravatar Vincent Rischmann2020-12-301-1/+19
|
* remove the allocator from Db and Db.initGravatar Vincent Rischmann2020-12-301-21/+18
|
* add initOptions for testingGravatar Vincent Rischmann2020-12-291-14/+24
|
* add InitOptionsGravatar Vincent Rischmann2020-12-291-15/+29
|
* add the threading modeGravatar Vincent Rischmann2020-12-291-0/+14
|
* rename is_ci to in_memoryGravatar Vincent Rischmann2020-12-281-2/+2
|
* fix some typosGravatar Vincent Rischmann2020-12-271-2/+2
|
* readBytes can simply take the allocator instead of the optionsGravatar Vincent Rischmann2020-12-271-16/+16
|