cuprate/database/src
hinto-janai f7bd1304e2
database: Errors (#62)
* error: add variants to `RuntimeError`

* error: remove `<BackendError>` generic

we can just map each backend error variant <-> our error as needed

* backend: impl `From<heed::Error>` for `RuntimeError`

* add `Never` type to allow foreign trait implementations

This is a newtype to workaround `sanakirja::Storable` not being
able to be implemented on `std::convert::Infallible` due to
"foreign trait on foreign type" rules.

* revert 0342848, fix `sanakirja` trait bounds

K/V will always be `[u8]`, not the concrete type
so it does not need to be bounded.

* backend: fix `sanakijra` K/V generics

* sanakirja: add `error.rs`

* error: remove serde traits

* heed: add `todo!()` for error mappings

* error: add `Corrupt` variant

* sanakirja: finish error mappings

* heed: finish error mappings

* error: add to error types

* env: use `InitError` in `Env::open()`

* error: docs

* heed: remove `serde.rs`

Not needed if all K/V's stored are `[u8]`.

* heed: use `heed::types::Bytes` as K/V

* database: docs

* heed: impl `From<heed::Error>` for `InitError`

* sanakirja: impl `From<sanakirja::Error>` for `InitError`

* error: fix doc warnings

* heed: fix `clippy::match_same_arms` in error match

* readme: add TODO

* error: add `BoxError`, and fatal/unknown variants

* heed: use `Fatal/Unknown` variants in errors

* sanakirja: use `Fatal/Unknown` variants in errors

* clippy

* sanakijra: remove `fallible_impl_from`

* error: remove `RuntimeError::InvalidVersion`

* error: remove `RuntimeError` variants that should panic

* error: remove `InitError::Fatal`

We will exit on all errors regardless.

Any non-enumrated variants will use `InitError::Unknown`.

* heed: fix error mappings

* constants: add `CUPRATE_DATABASE_CORRUPT_MSG`

* sanakijra: fix error mappings

* heed: fix import

* comments/docs

* key: fix docs
2024-02-17 13:00:14 +00:00
..
backend database: Errors (#62) 2024-02-17 13:00:14 +00:00
ops Database (#35) 2024-02-13 17:43:25 +00:00
service Database (#35) 2024-02-13 17:43:25 +00:00
constants.rs database: Errors (#62) 2024-02-17 13:00:14 +00:00
database.rs Database (#35) 2024-02-13 17:43:25 +00:00
env.rs database: Errors (#62) 2024-02-17 13:00:14 +00:00
error.rs database: Errors (#62) 2024-02-17 13:00:14 +00:00
free.rs Database (#35) 2024-02-13 17:43:25 +00:00
key.rs database: Errors (#62) 2024-02-17 13:00:14 +00:00
lib.rs database: Errors (#62) 2024-02-17 13:00:14 +00:00
macros.rs Database (#35) 2024-02-13 17:43:25 +00:00
pod.rs database: move Pod bound from Table -> Key (#61) 2024-02-13 22:21:10 +00:00
table.rs database: Errors (#62) 2024-02-17 13:00:14 +00:00
tables.rs Database (#35) 2024-02-13 17:43:25 +00:00
transaction.rs Database (#35) 2024-02-13 17:43:25 +00:00