Skip to main content

Crate appdb

Crate appdb 

Source

Re-exports§

pub use query::Order;
pub use auth::*;
pub use connection::*;
pub use crypto::*;
pub use error::*;
pub use graph::*;
pub use repository::*;
pub use serde_utils::id::*;
pub use tx::*;

Modules§

auth
Authentication helpers for bootstrapping the embedded database.
connection
Database runtime setup and global handle access.
crypto
Encryption helpers and key-provider abstractions.
error
Library error types.
graph
Graph relation helpers built on top of SurrealDB relation tables.
model
Model metadata, schema registration, and relation metadata.
prelude
Common re-exports for application code.
query
Raw and builder-style query helpers.
repository
CRUD internals plus the model-facing Crud trait.
serde_utils
Serde helpers for ids and SurrealDB-friendly encoding.
tx
Explicit transaction runner helpers.

Macros§

impl_schema
Registers a schema DDL string for a type.

Structs§

AutoFill
Opaque appdb-managed scalar used by #[fill(...)] fields.
RelationWrite
Prepared relation-table writes for one #[relate(...)] field.
SensitiveValueOf
Wrapper that stores any serde value through the approved secure-value seam.

Enums§

RelationWriteDirection
Synchronization direction for one relation-backed field write.

Traits§

Bridge
Runtime seam for values persisted by #[foreign] fields.
ForeignLookupShape
Read-only lookup seam for #[foreign] container shapes.
ForeignModel
Runtime seam for explicit nested #[foreign] persistence and hydration.
ForeignPersistence
Runtime persistence context for foreign resolution/creation.
ForeignShape
Recursive runtime seam for #[foreign] container shapes.
RelateShape
Runtime seam for relation-backed field shapes.
Sensitive
Trait implemented by encrypted domain types generated by #[derive(Sensitive)].
SensitiveShape
Recursive runtime seam for supported #[secure] shapes.
SensitiveValue
Runtime/storage seam for enum-bearing leaves inside an approved secure container.
StoredModel
Runtime conversion seam between the caller-facing model and the stored representation.

Functions§

decode_record_link_value
Rewrites string-form record links into the canonical RecordId serde contract.
decode_stored_record_links
Rewrites stored foreign payloads into the canonical RecordId serde contract.
resolve_foreign_record_id
Saves or resolves one foreign child model and returns its record id.
resolve_foreign_record_id_with
Saves or resolves one foreign child model through the provided persistence context.
rewrite_foreign_json_value
Converts foreign JSON shapes like { id: ... } into raw record-id JSON values.

Derive Macros§

Bridge
Relation
Sensitive
Store