Sebastian Jeltsch
503d7cae9b
Pass connection constructor to prepare for broader concurrency models.
2025-04-08 10:05:56 +02:00
Sebastian Jeltsch
f7cce2dc44
Fix logging: deterministically and separately initialize log and tracing.
2025-04-04 13:23:26 +02:00
Sebastian Jeltsch
31d7dc4158
Use statement cache in more places.
2025-04-03 21:59:23 +02:00
Sebastian Jeltsch
edfbd4c4f6
Manage file deletions through an auxiliary table: "_file_deletions" and triggers.
...
This allows deleting files eagerly w/o a transaction (i.e. pre-op query to get
old values), allows for defered cleanups, and retries.
2025-04-02 00:15:05 +02:00
Sebastian Jeltsch
d9525cd754
Minor: remove log dep from library crates.
2025-03-31 11:26:03 +02:00
Sebastian Jeltsch
c63f3f4089
Cleanup: remove legacy query_one_row utility.
2025-03-10 11:09:31 +01:00
Sebastian Jeltsch
5705b99b6c
Audit and remove remaining unwraps.
2025-03-09 00:04:09 +01:00
Sebastian Jeltsch
c06ceee31b
Control expansion of FKs in RecordApi.(read|list) via query parameters.
2025-02-13 13:47:10 +01:00
Sebastian Jeltsch
fd318cf328
Expand/inline foreign records in RecordApi list results.
2025-02-13 13:47:10 +01:00
Sebastian Jeltsch
757f0c370d
Expand/inline foreign records in RecordApi read.
2025-02-13 13:47:03 +01:00
Sebastian Jeltsch
5144dabc68
Major version update: SQLite 3.46.1 to 3.48.0.
2025-01-19 17:39:30 +01:00
Sebastian Jeltsch
2fb294f17c
Breaking: nest records in output of RecordAPI.list to contain cursor now and potentially more in the future.
...
Also update all the client libraries to accept the new format.
2025-01-19 15:40:09 +01:00
Sebastian Jeltsch
1828ebad5a
Optimization: reduce allocations, cloning and re-encoding.
2025-01-13 22:40:27 +01:00
Sebastian Jeltsch
30f295e6fd
Add "realtime" subscriptions for a specific record, i.e. updates and deletion.
2025-01-13 22:38:14 +01:00
Sebastian Jeltsch
e2c43a4c41
Prepare vendored sqlean to be published as a crate.
2024-12-30 11:36:07 +01:00
Sebastian Jeltsch
312d161048
Reduce number of allocations.
2024-12-17 13:11:01 +01:00
Sebastian Jeltsch
18d1d87710
Add a hooks API to trailbase_sqlite::Connection.
2024-12-16 17:07:17 +01:00
Sebastian Jeltsch
746f0c1108
Make connection constructor synchronous.
2024-12-16 17:00:51 +01:00
Sebastian Jeltsch
4894cc0bb0
Minor: move Row/Rows into a separate file.
2024-12-16 17:00:47 +01:00
Sebastian Jeltsch
51a6af3149
Remove sqlite-loadable and use rusqlite functions instead.
2024-12-16 16:41:52 +01:00
Sebastian Jeltsch
a675d09b1f
Remove unused conn.call_and_forget function.
2024-12-09 21:43:30 +01:00
Sebastian Jeltsch
03d918cd94
Remove unused code.
2024-12-05 10:10:43 +01:00
Sebastian Jeltsch
1b5c957415
Move SQLite orchestration into trailbase-sqlite and fix js-runtime completion bug with true async (previously libsql was sync under the hood).
2024-12-04 16:57:15 +01:00
Sebastian Jeltsch
3b9a122e06
Install sqlite-vec to replace libsql's builtin vector search.
2024-12-04 13:14:14 +01:00
Sebastian Jeltsch
6cbea390fb
Herculean migration from libsql's rust bindings to plain rusqlite+SQLite.
...
There's a couple of reasons:
* As for the rust bindings: they're sub-par to rusqlite, though
rusqlite is amazing. Even libsql-server uses rusqlite over their own
bindings. The bindings are missing features such as update hooks
and the hard-coded execution model suffers from lock congestion.
* We've fixed bugs (e.g. trivial null ptr accesses went unnoticed),
raised issues, and tried to add missing functionality such as update
hooks. It's unclear if the rust-bindings are a priority or covered by
the principles laid out in the libsql manifesto. From the outside it
looks like focus has shifted to https://github.com/penberg/limbo .
* As for the C-libsql fork for SQLite itself, it's getting more and
more outdated (2024-01-30 (3.45.1)) and it's unclear when and if the
ideas from the manifesto will manifest.
Looking forward this opens the door for TrailBase to:
* Bundle more recent versions of SQLite
* Implement more performant, better scaling execution models.
* Implement realtime APIs for subscribing to data changes.
2024-12-04 13:03:06 +01:00
Sebastian Jeltsch
d3fd82c29f
Add frequency-by-country-code as a new aggregate stat to logs fetch.
...
In the future we will be able to use this in the admin dashboard.
2024-11-03 20:45:37 +01:00
Sebastian Jeltsch
bde2577dba
Experimental: support decoding client ips with geoip database.
2024-11-03 20:45:37 +01:00
Sebastian Jeltsch
bdb3735840
Squash all commits for a fresh start.
...
This is only to avoid accidentally leaking any secrets from early development especially in the light of short-sha attacks.
2024-10-30 23:38:56 +01:00