f86b24001f
* Add top-level `Conn`. Fixes #296. This is a little different than the API rnewman and I originally discussed in https://public.etherpad-mozilla.org/p/db-conn-thoughts. A few notes: - I was led to make a `Schema` instance the thing that is shared, rather than a `db::DB`. It's possible that queries will want to know the current transaction at some point (to prevent races, or to query historical data), but that can be a future consideration. - The generation number just allows for a cheap comparison. I don't care to handle races to transact just yet; the long term plan might be to make embedding applications responsible for avoiding races, or we might handle queuing transactions and yielding report futures in Mentat itself. - The sharing of the partition maps is a little more subtle than expected. Partition maps are volatile: a successful Mentat transaction always advances the :db.part/tx partition, so it's not worth passing references around. This means that consumers must clone in order to maintain just a single clone per transaction. Clean some cruft. * Review comments. |
||
---|---|---|
.. | ||
src | ||
tests | ||
Cargo.toml | ||
README.md |
This sub-crate implements the SQLite database layer: installing, managing, and migrating forward the SQL schema underlying the datom store.