summaryrefslogtreecommitdiff
path: root/sqlite.zig (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* rename argument for clarityGravatar Vincent Rischmann2021-12-181-3/+3
| | | | also style consistency; variables should be snake case
* all: replace spanZ with sliceToGravatar Vincent Rischmann2021-12-011-8/+12
|
* all: fix for latest Allocator interface refactorGravatar Vincent Rischmann2021-12-011-44/+61
|
* dynamic statement: fix documentationGravatar Vincent Rischmann2021-11-221-3/+5
|
* dynamic statement: document bind()Gravatar Vincent Rischmann2021-11-221-0/+33
|
* dynamic statement: add some testsGravatar Vincent Rischmann2021-11-221-0/+98
|
* dynamic statement: fix one()Gravatar Vincent Rischmann2021-11-221-1/+1
|
* remove smartBind/bindNamedStruct, they're not actually necessaryGravatar Vincent Rischmann2021-11-221-33/+11
|
* FixesGravatar Felix "xq" Queißner2021-11-221-3/+36
|
* A handful of tiny fixes.Gravatar Felix "xq" Queißner2021-11-221-6/+6
|
* savepoint: always deinit the statementsGravatar Vincent Rischmann2021-11-071-0/+5
|
* implement savepointGravatar Vincent Rischmann2021-10-231-0/+250
|
* use explicit error sets everywhereGravatar Vincent Rischmann2021-10-231-11/+25
|
* sqlite: move to new ParsedQuery and BindMarkerGravatar thisLight2021-10-191-13/+9
|
* use snake case for field namesGravatar Vincent Rischmann2021-10-181-3/+3
|
* make bindField clearerGravatar Vincent Rischmann2021-10-181-34/+52
| | | | | | | | | | Be less clever with comptime reflection. This has the advantage of making the code a lot clearer, clearly identifying which case are converting an sqlite int result to an error. This also makes it easier to follow the error trace if there is an error while binding a field.
* no need for comptimePrint hereGravatar Vincent Rischmann2021-10-181-1/+1
|
* improve documentation of DynamicStatementGravatar Vincent Rischmann2021-10-181-27/+27
|
* Db.getPragmaQuery: use comptimePrint instead of bufPrintGravatar thisLight2021-10-181-7/+5
|
* add the StatementType functionGravatar Vincent Rischmann2021-10-131-10/+24
| | | | | | | This function returns the type of a statement as would be returned by Db.prepare. Needed to be able to store a statement in a struct.
* sqlite: format codeGravatar thisLight2021-10-131-19/+14
|
* DynamicStatement.translateError: fix typo in nameGravatar thisLight2021-10-131-2/+2
|
* DynamicStatement.bindField: fix incompatible if branches for optionalsGravatar thisLight2021-10-131-1/+1
|
* sqlite: some doc fixesGravatar thisLight2021-10-131-5/+5
|
* DynamicStatment: introduce original sqlite3 statement.Gravatar thisLight2021-10-131-122/+442
|
* test binding an optional value tooGravatar Vincent Rischmann2021-10-121-1/+3
|
* fix typoGravatar Vincent Rischmann2021-10-111-1/+1
|
* fix pragma code, return value must be explicitly ignoredGravatar Vincent Rischmann2021-10-111-1/+1
|
* use `try` instead of `catch unreachable`Gravatar Meghan Denny2021-10-061-1/+1
|
* add inserting and reading test for struct BaseType supportGravatar Meghan Denny2021-10-061-0/+57
|
* add BaseType support for structsGravatar Meghan Denny2021-09-231-0/+7
|
* add iteratorAlloc and execAllocGravatar Meghan Denny2021-09-231-2/+30
|
* add options parameter to bind/bindFieldGravatar Meghan Denny2021-09-231-9/+9
|
* more minor cleanupsGravatar Vincent Rischmann2021-09-071-10/+4
|
* Stop using anytype in the public API.Gravatar Vincent Rischmann2021-09-071-32/+52
| | | | | | | | | | | | | | | | | | | | | The need for using `options: anytype` in readXYZ functions is so that they can be used both when called by `one`/`next` or `oneAlloc`/`nextAlloc`. In the first case there won't be an allocator member in the tuple, in the latter there will be. But, since the public API takes an explicit allocator argument in `oneAlloc`/`nextAlloc` there's no need to take a `anytype` options in the public API. This commit changes the public API to always use `QueryOptions`. This commit also adds a bunch of explicit comptime checks to validate the options type passed to the readXYZ functions. Especially important is checking the presence of the `allocator` field if the function requires an allocator. Finally, cleanup some stuff and reorder arguments in `readPointer`.
* fix for ziglang/zig#9618Gravatar Vincent Rischmann2021-09-041-12/+15
|
* fix the compile error from readArrayGravatar Vincent Rischmann2021-08-311-2/+2
|
* implement reading a text column into an enum value directlyGravatar Vincent Rischmann2021-08-261-0/+39
| | | | | oneAlloc/nextAlloc can allocate memory so are allowed to use text backed enums.
* implement reading an integer column into an enum value directlyGravatar Vincent Rischmann2021-08-261-1/+60
| | | | one/next can't alloc so they are limited to integer values.
* fix documentationGravatar Vincent Rischmann2021-08-261-4/+2
|
* sqlite: interpret database path in init flags as uriGravatar Kenta Iwasaki2021-08-271-1/+1
| | | | | | | | | | | | | | | | | | | To avoid the need for introducing multiple sqlite.Mode's for addressing all the different possible ways one may initialize a SQLite database, enable the flag SQLITE_OPEN_URI by default. This allows for initialization options which are not addressed by InitFlags as of yet, such as the option to initialize a shared in-memory SQLite database instance that may be shared across connections in the same address space, to be set via. URI query parameters. e.g. sqlite.Db.init({ .mode = .{ .File = "file:hello.db?mode=memory&cache=shared" }, .open_flags = .{ .create = true, .write = true }, .threading_mode = .MultiThread, });
* sqlite: expose c import, add 'shared_cache' to init flagsGravatar Kenta Iwasaki2021-08-261-1/+10
| | | | | | | | | | | | | Expose the C import to sqlite.h. Making a separate call to @cImport outside of the library will cause Zig to regenerate all definitions in sqlite.h. The regenerated definitions (i.e. structs, enums) would not be equivalent to the definitions imported in by this library. This causes problems in the case one wants to manually wrap SQLite structs, pointers, and enums with the helpers provided in this library. Added 'shared_cache' to init flags in order to allow having the same backing table and statement cache shared amongst all connections pointed to the same database file.
* dry up the updated constraint checkGravatar Meghan Denny2021-08-241-14/+11
|
* fix type constraint checks for container and non-container typesGravatar Meghan Denny2021-08-241-2/+18
|
* enum tests now pass without orelse in readGravatar Meghan Denny2021-08-241-1/+1
|
* fix bind indexGravatar Meghan Denny2021-08-241-2/+2
|
* tests- add enum field casesGravatar Meghan Denny2021-08-231-12/+31
|
* tests- use select * when pulling into a structGravatar Meghan Denny2021-08-231-2/+2
|
* add support for enum fields and lay groundwork for #39Gravatar Meghan Denny2021-08-231-1/+21
|
* Merge pull request #36 from nektro/masterGravatar Vincent Rischmann2021-08-121-11/+10
|\ | | | | Various fixes