* propagate schema name (iDb) for vector index to support working not only with main DB
* add basic test
* sometimes zDbSName can be null and this is fine
* avoid test from writing files to disk
* build bundles
* integrate diskann to the sqlite code
* cleanup code a bit and add more comments
* make parsing code resilient to spaces inside FLOAT typename
* fixup
* fix bugs related to deletes in diskann
* small cleanup
* rename macro
* slightly cleanup vtab code
* slightly improve vectorIndex code
* make code less hacky
* add strange test
* build bundles
* return unit test for diskann pieces
* add one more test
* don't run search on first insertion
* review fixes
* disable index creation in non-normal parse modes
* build bundles
* add basic functions for working with f32/f64 vectors
* add header file
* fix comment style
* add generic code for working with vectors
* register vector functions
* fix edge cases in vector extract impl
* add static flag for vector (will be used later)
* add basic TCL-based tests
* guard vector functions with SQLITE_OMIT_VECTOR
* adjust build scripts
* delete libsql_vector_idx from this branch
* add one more test
* update bundles
* fix asserts
* fix constants (#define-s are universal but const int doesn't recognized by all compilers)
* update bundles
* review fixes
* build bundles
* add comment about linking math library
* add alter column test
* apply alter column only to the table and ignore indices/triggers/views etc
* fix tests
* update bundle
* add test in rust_suite
* add basic TCL tests for ALTER COLUMN libsql feature
* propagate length of the new column definition directly from the parser
- this will allow libsql to automatically handle comment and space characters appended to the column definition
* small formatting fixes
* cargo xtask build-bundled
* add test against sqlite3 source in rust_suite
* fix test in rust_suite
* Return also Program from Connection::run
Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
* Extract LibSqlConnection::execute
Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
* Use LibSqlConnection::execute in write_proxy
Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
* Remove Clone from Program
Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
* Remove Arc from Program
Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
* Allow a single transaction in schema migration
Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
* fix rustc-hash dep issue
Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
---------
Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
* introduce connection manager
* remove unused wal methods
* remove lock stealer
* Make use of ConnectionManager in LibsqlConnection
it now takes a W: WalWrap instead of a WalManager. This is because we
want to inject the connection manager at the bottom of the wal wrapping
chain.
* add missing deps
* turn ReplicationLogger into a WrapWal
* update spots to to pass wal wrapper instead of wal manager
* remove dbg
* fmt
* fix sqlite3 rust tests
* Add regression tests for random rowid bugs
Tests added for:
1. VACUUM does not respect RANDOM ROWID - https://github.com/tursodatabase/libsql/issues/929
2. Bulk insert into a fresh table does not respect RANDOM ROWID - https://github.com/tursodatabase/libsql/issues/1046
In both cases, the table should end up random rowids, but they seem to have sequential ones.
* bugfix: pass `regNextRowid` to `OP_NewRowid` call in `xferOptimization`
The register `regNextRowid` contains the `LIBSQL_RANDOM_ROWID_MARKER` value
which tells the VDBE to use a random value for row ids. The method `xferOptimization`
is used in `VACUUM` and bulk insert routines where data from one table is
inserted in another. Since the data is inserted in a loop, it checks for
max rowid once and then keeps inserting it serially. Hence we pass the marker
in each call, so that random id is generated.
* Remove `libsql_module` field from `sqlite3_vtab`
* remove `libsql_module` struct
Also removed the associated functions `libsql_create_module_v2`, `libsql_create_module` functions'.
The `libsql_module` had a function `xPreparedSql` which is now moved to `sqlite_module`. The `sqlite_module` might get changed in the upstream, so added some padding space for our custom functions
* generate ffi bindings
* Add a github workflow to test crsqlite
* fix crsqlite: remove `pLibsqlModule` references
* Add tests for sqlite-vss extension