Bob Peterson
cd56f52bd6
Add cfg attributes for running under Miri
2025-10-13 14:54:16 -05:00
Pekka Enberg
ecbe2c231f
core: Rename Connection::_db to db
2025-09-18 16:00:41 +03:00
Pekka Enberg
6472a71ae7
Merge 'core: Wrap symbol table with RwLock' from Pekka Enberg
...
Make it Send.
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com >
Closes #3168
2025-09-17 11:47:40 +03:00
Pekka Enberg
50653258cf
core: Wrap symbol table with RwLock
...
Make it Send.
2025-09-17 10:58:32 +03:00
Pekka Enberg
06d869ea5e
core/ext: Switch vtab_modules from Rc to Arc
2025-09-17 10:36:12 +03:00
PThorpe92
273c12b2b3
Remove extension Conn from VirtualTable to survive schema changes
2025-08-06 16:27:26 -04:00
Diego Reis
bab10909c3
Disable extension loading for wasm
...
We should enable it later when wasm become more mature
2025-07-28 14:49:07 -03:00
Pere Diaz Bou
752a876f9a
change every Rc to Arc in schema internals
2025-07-28 10:51:17 +02:00
Glauber Costa
a10d8d7f94
silence clippy errors with features disabled
...
When compiling with features disabled, there are lots of clippy
warnings. This PR silences them.
For the utils file, I am using a bit of a hammer and just allowing
unused stuff in the whole file. Due to the box of utilities nature of
this file, it'll always be the case that things will be unused depending
on the feature-set.
2025-07-22 20:37:45 -05:00
PThorpe92
a92126961d
Remove duplicate case and just send Mutex along with schema for extension registrations
2025-07-21 20:06:14 -04:00
PThorpe92
f7ba8efdbd
Switch back to std::mutex because it was an unnecessary change
2025-07-21 19:20:17 -04:00
PThorpe92
411c4f059a
Load compile time extensions on the initial db startup instead of once per conn
2025-07-21 19:09:31 -04:00
PThorpe92
5ebd3f7271
Change api of extension api context to support static extensions held on db
2025-07-21 19:08:27 -04:00
Levy A.
8e8f1682df
add with_schema_mut
...
removes all repeated `Arc::make_mut`
2025-07-16 13:54:39 -03:00
Levy A.
d0e26db01a
use lock for database schema
2025-07-16 13:54:39 -03:00
Piotr Rzysko
30ae6538ee
Treat table-valued functions as tables
...
With this change, the following two queries are considered equivalent:
```sql
SELECT value FROM generate_series(5, 50);
SELECT value FROM generate_series WHERE start = 5 AND stop = 50;
```
Arguments passed in parentheses to the virtual table name are now
matched to hidden columns.
Column references are still not supported as table-valued function
arguments. The only difference is that previously, a query like:
```sql
SELECT one.value, series.value
FROM (SELECT 1 AS value) one, generate_series(one.value, 3) series;
```
would cause a panic. Now, it returns a proper error message instead.
Adding support for column references is more nuanced for two main
reasons:
- We need to ensure that in joins where a TVF depends on other tables,
those other tables are processed first. For example, in:
```sql
SELECT one.value, series.value
FROM generate_series(one.value, 3) series, (SELECT 1 AS value) one;
```
the one table must be processed by the top-level loop, and series must
be nested.
- For outer joins involving TVFs, the arguments must be treated as ON
predicates, not WHERE predicates.
2025-07-14 07:16:53 +02:00
Nils Koch
828d4f5016
fix clippy errors for rust 1.88.0 (auto fix)
2025-07-12 18:58:41 +03:00
pedrocarlo
711b1ef114
make all run_once be run under statement or connection so that rollback is called
2025-07-07 11:51:25 -03:00
Pekka Enberg
60191e7c7b
Move series extension to core
...
It's part of upstream SQLite too.
2025-06-30 10:29:34 +03:00
Pekka Enberg
c9945950e8
core: Remove dependencies to extensions
...
We don't want to publish all extensions on crates.io, at least not for now.
2025-06-30 10:01:03 +03:00
Pekka Enberg
39fd84f297
Move time extension to core
2025-06-30 10:01:03 +03:00
Pekka Enberg
12131babae
Move UUID extension to core
...
We want to bundle the UUID extension by default so move the code to core.
2025-06-30 09:54:13 +03:00
Pekka Enberg
d377f4c948
Move completion extension dependency to CLI
...
We never need it in core anyway.
2025-06-29 13:32:17 +03:00
Pekka Enberg
eb0de4066b
Rename limbo_ext crate to turso_ext
2025-06-29 12:14:08 +03:00
PThorpe92
0e26cf77cb
Remove dependency on testing extension crate
2025-06-27 09:41:18 -04:00
Pekka Enberg
2fc5c0ce5c
Switch to runtime flag for enabling indexes
...
Makes it easier to test the feature:
```
$ cargo run -- --experimental-indexes
Limbo v0.0.22
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database
limbo> CREATE TABLE t(x);
limbo> CREATE INDEX t_idx ON t(x);
limbo> DROP INDEX t_idx;
```
2025-06-26 10:07:28 +03:00
Nils Koch
2827b86917
chore: fix clippy warnings
2025-06-23 19:52:13 +01:00
Pekka Enberg
90c1e3fc06
Switch Connection to use Arc instead of Rc
...
Connection needs to be Arc so that bindings can wrap it with `Mutex` for
multi-threading.
2025-06-16 10:43:19 +03:00
PThorpe92
1cacbf1f0d
Close statements in extension tests, and use mut pointers for stmt
2025-05-24 16:45:25 -04:00
PThorpe92
d63f9d8cff
Make sure all resources are cleaned up properly in xconnect
2025-05-24 16:38:33 -04:00
PThorpe92
a4ed464ec4
Add some traces for errors in xconnect
2025-05-24 15:44:06 -04:00
PThorpe92
999205f896
Add documentation for connection api
2025-05-24 15:19:37 -04:00
PThorpe92
d11ef6b9c5
Add execute method to xConnect db interface for vtables
2025-05-24 14:49:58 -04:00
PThorpe92
c2ec6caae1
Finish integrating xConnect into vtable open api
2025-05-24 14:49:58 -04:00
PThorpe92
d51614a4fd
Create extern functions to support vtab xConnect in core/ext
2025-05-24 14:49:57 -04:00
Piotr Rzysko
ad9d044a04
Add CSV extension
2025-05-21 09:22:59 +02:00
Jussi Saurio
60a13c129f
io/linux: make syscallio the default (io_uring is really slow)
2025-04-10 13:32:26 +03:00
PThorpe92
9b1e60a29c
Fix typo in ext library lock err message
2025-04-08 20:10:50 -04:00
PThorpe92
6b5ec1f07b
Remove mut borrow from sym table in parse schema fn
2025-04-08 20:10:49 -04:00
PThorpe92
4b9b6c969b
Parse schema rows after extensions are loaded
2025-04-08 20:10:47 -04:00
PThorpe92
e9420e7d2b
Fix platform specific ffi c ptr types
2025-03-24 22:48:07 -04:00
PThorpe92
57d4aa7216
Reorganize ext library and feature gate vfs to more easily prevent wasm build issues
2025-03-19 10:17:11 -04:00
PThorpe92
64d8575ee8
Hide add_builtin_vfs_extensions from non fs feature
2025-03-12 21:52:52 -04:00
PThorpe92
c1f5537d39
Fix feature flagging static vfs modules
2025-03-12 21:52:52 -04:00
PThorpe92
f8455a6a3b
feature flag register static vfs to fs feature
2025-03-12 21:52:51 -04:00
PThorpe92
2cc72ed9ab
Feature flag vfs for fs feature/prevent wasm
2025-03-12 21:52:51 -04:00
PThorpe92
89a08b7611
Add vfslist command and setup CLI with new db open api
2025-03-12 21:52:51 -04:00
PThorpe92
7d18b6b8b0
Create global vfs module registry
2025-03-12 21:52:50 -04:00
PThorpe92
b2748c61b2
Define API for registration of staticly linked vfs modules
2025-03-12 21:52:50 -04:00
PThorpe92
7c4f5d8df8
Add macros for generating FFI functions to support vfs
2025-03-12 21:52:50 -04:00