Commit graph

110 commits

Author SHA1 Message Date
Daniel Kaluza
3b85015f55 Fix inconsistent SQLITE_NOTFOUND error code 2025-01-03 11:19:21 +01:00
Daniel Kaluza
34690e3b63 Remove dependency on system libsqlite headers from compatibility tests 2025-01-03 11:19:21 +01:00
PThorpe92
f6cd707544
Add clippy CI, fix or ignore warnings where appropriate 2024-12-29 10:25:41 -05:00
Pekka Enberg
f2ecebc357 Rename RowResult to StepResult
The name "row result" is confusing because it really *is* a result from
a step() call. The only difference is how a row is represented as we
return from VDBE or from a statement.

Therefore, rename RowResult to StepResult.
2024-12-27 10:20:41 +02:00
Pere Diaz Bou
5cd84a407f fmt 2024-12-24 18:42:58 +01:00
Pere Diaz Bou
aed14117c9 core: transaction support 2024-12-24 18:04:30 +01:00
Pekka Enberg
8387e7903c sqlite: Fix source formatting 2024-12-20 09:30:03 +02:00
Pekka Enberg
56710b0187 sqlite3: Implement sqlite3_free_table() 2024-12-20 09:18:31 +02:00
Pekka Enberg
d0fa9e07f7 Merge 'sqlite3: Add sqlite3_wal_checkpoint_*() API' from Pekka Enberg
This wires up checkpointing to the SQLite C API. We don't respect the
checkpointing mode because core does not have that nor do we report back
some stats.

Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>

Closes #480
2024-12-20 09:06:04 +02:00
Diego Reis
3a0e56bca5 Implement basic sqlite3_get_table() API 2024-12-19 23:13:51 -03:00
Pere Diaz Bou
dbe6b8d899 Merge 'Add statement interruption support' from Pekka Enberg
This adds an interrupt() method to Statement that allows apps to
interrupt a running statement. Please note that this is different from
`sqlite3_interrupt()` which interrupts all ongoing operations in a
database. Although we want to support that too, per statement interrupt
is much more useful to apps.

Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>

Closes #512
2024-12-19 12:59:19 +01:00
Pekka Enberg
e93ac38e55 Add statement interruption support
This adds an interrupt() method to Statement that allows apps to
interrupt a running statement. Please note that this is different from
`sqlite3_interrupt()` which interrupts all ongoing operations in a
database. Although we want to support that too, per statement interrupt
is much more useful to apps.
2024-12-19 12:30:32 +02:00
mag1c1an1
ab306e9550 Fix issue #499 (add crate-type in libmo_sqlite3)
Signed-off-by: mag1c1an1 <mag1cian@icloud.com>
2024-12-19 17:33:06 +08:00
Pekka Enberg
f1937ee47f sqlite3: Add sqlite3_wal_checkpoint_*() API
This wires up checkpointing to the SQLite C API. We don't respect the
checkpointing mode because core does not have that nor do we report back
some stats.

Refs: #478
2024-12-15 10:58:52 +02:00
Pekka Enberg
636b78d4ff Merge 'Minimal cargo-c support' from Luca Barbato
Fixes #437

Closes #458
2024-12-15 09:30:12 +02:00
Luca Barbato
eacbba2c07 Minimal cargo-c support 2024-12-14 15:19:50 +01:00
Pere Diaz Bou
3e59da439c fmt 2024-12-13 13:10:33 +01:00
Pere Diaz Bou
97dd95abea core: change Rc<RefCell<Page>> to Arc<Page>
This includes an inner struct in Page wrapped with Unsafe cell to access
it. This is done intentionally because concurrency control of pages is
handled by pages and not by the page itself.
2024-12-13 13:09:13 +01:00
Pere Diaz Bou
a4297702bd extract page cache to be multi threaded 2024-12-13 13:09:13 +01:00
jussisaurio
9bc3ccc394 fmt 2024-12-03 19:11:08 +02:00
Pekka Enberg
17c7e8d346 sqlite3: Disable env_logger default features
Let's keep the dependencies as light-weight as possible.
2024-11-16 09:47:12 +02:00
Pere Diaz Bou
a4b473ba59 fmt 2024-11-13 19:17:49 +01:00
Pere Diaz Bou
c46bd63b5a core: drop mutex on contents
There is no need to have mutexes on buffers, we will introduce mutexes
if we want later on a file level to introduce serializability.
2024-11-13 19:13:15 +01:00
Pere Diaz Bou
c0e51c4ca6 wip wal 2024-11-05 15:29:53 +01:00
Pekka Enberg
f23c668488 Revert part of "Fix source formatting with cargo fmt"
Looks like there's difference in `cargo fmt` across toolchain versions.
Perhaps it's time to add `rust-toolchain.toml` to the project...
2024-09-22 08:58:48 -04:00
Pekka Enberg
5aeb18f474 Fix source formatting with cargo fmt 2024-09-22 08:52:32 -04:00
김선우
f08dc9e2c0 Revert sqlite3/src/lib 2024-09-15 16:32:12 +09:00
김선우
28884181be Fix clippy 2024-09-15 16:23:27 +09:00
rjhallsted
9791e2074f Fix cargo fmt complaint 2024-09-10 14:32:25 -07:00
Pekka Enberg
6e8a1117fe sqlite3: Format source code with cargo fmt 2024-08-22 17:54:25 +03:00
Pekka Enberg
c69b2ab4f6 sqlite3: Fix LFS feature flag 2024-08-22 17:53:07 +03:00
Pekka Enberg
e30b5f1082 Commit updated Cargo.lock and sqlite3.h
Turns out the new cbindgen version generates slightly different
sqlite3.h so commit that to the tree. The version in Cargo.lock also
changed so let's check in that too.
2024-08-15 19:42:10 +03:00
Pekka Enberg
f633fc91cf sqlite3: Add to cargo dist bundle 2024-08-11 12:14:43 +03:00
JeanArhancet
7c362b129f feat: impl python binding
refactor: pep-0249

refactor: rust comment and requirements-dev.txt

fix: name conflict
2024-08-11 08:58:18 +02:00
Pekka Enberg
5219fc7258 Update cbindgen dependency
Fixes #63
2024-08-10 14:29:20 +03:00
jussisaurio
84cf4033d5 Refactor join processing
- Make all constraints a list of WhereTerms in a ProcessedWhereClause
- Support multiple joins instead of just one
2024-07-23 15:04:40 +03:00
Joan Martinez
642603b6c7 perf-latency: fix enabling to build multitenancy 2024-07-21 19:13:02 +02:00
Joan Martinez
4bcae54aa9 fix: use Arc to handle IO 2024-07-21 19:01:58 +02:00
Pekka Enberg
17727ef1af sqlite3: Make stub function failures more explicit 2024-07-21 13:34:39 +03:00
Pekka Enberg
15eb26f802 Merge pull request #187 from mazchew/cpython-error-compatibility
Add implementations of sqlite3 error codes and messages for compatibility with CPython
2024-07-21 13:32:44 +03:00
mazchew
c90f7b8222 add cpython compatibility for error codes and messages
edits

minor edit
2024-07-21 17:56:05 +08:00
JeanArhancet
569322446a feat: add round scalar function 2024-07-21 10:29:30 +02:00
Pekka Enberg
af7b8b6768 sqlite3: Implement some auxiliary functions
This adds `sqlite3_libversion()`, `sqlite3_libversion_number()`, and
`libsql3_threadsafe()`.
2024-07-17 13:00:35 +03:00
Pekka Enberg
a08051b106 sqlite3: Disable tests that SIGSEGV with sqlite3 on x86 2024-07-17 12:59:54 +03:00
Pekka Enberg
4efa6e5efa sqlite3: API function tracing 2024-07-17 12:59:54 +03:00
Pekka Enberg
8fb50cc9bc sqlite3: Auto initialize in sqlite3_open() 2024-07-17 12:34:29 +03:00
Pekka Enberg
d81a346d74 sqlite3: Implement sqlite3_{initialize,shutdown}
They're no-ops for now.
2024-07-17 12:34:29 +03:00
Pekka Enberg
80fc9bacf1 sqlite3: Fix test linking 2024-07-17 12:34:17 +03:00
Pekka Enberg
3e73694370 build: Add sqlite3 API tests to make test 2024-07-17 12:13:45 +03:00
Pekka Enberg
54feddabed sqlite3/tests: Add missing test-prepare.c 2024-07-17 12:13:45 +03:00