Skip to main content

Crate pharos_runtime_database

Crate pharos_runtime_database 

Source
Expand description

Backend-neutral primary database identity, configuration, and registry. Vendor-specific database drivers live in their respective adapter crates.

Re-exports§

pub use backend::BackendCapabilities;
pub use backend::BackendConnection;
pub use backend::BackendError;
pub use backend::BackendKind;
pub use backend::DbBackendConfig;
pub use backend::PrimaryBackend;
pub use backend_registry::BackendRegistry;

Modules§

account_tokens
Atomic password-reset completion over the configured database adapter.
backend
backend_registry
contract
Bounded loading and validation for one app-owned logical database contract.
conversion
Lossless value conversion for guarded logical field migrations. Adapters use the same preflight before changing any physical representation.
document
Atomic document operations for apps that declare document-shaped persistence.
effects
Transaction-local outbox composition without selecting a database vendor.
historical
Bounded historical JSON adoption through the same logical field contract.
index_values
Shared value semantics for materialized expression index keys.
integration
Bounded integration delivery operations over the configured backend.
operations
Logical data operations shared by apps and primary-backend implementations. App code supplies validated entity and field names; an adapter owns physical queries, connections, migrations, and durable transaction semantics.
payment
Bounded payment settings reads through the configured app database.
queue
Bounded queue readiness reads over the configured database adapter.
relational
Parameterized SQL lowering shared by the three relational backend adapters. Connection, isolation, error mapping, and migration execution remain with the SQLite, PostgreSQL, and MySQL adapter crates.
seed_from
Bounded, owner-neutral missing-record adoption shared by every adapter.
sequence
Scoped counters whose allocation commits with the consuming app mutation.
snapshot
Portable validation and ordering for atomic operator snapshot restoration.
state_delta
Scoped writes for legacy worker state changes during logical adoption.
webhook
Durable webhook receipt writes through the configured database adapter.

Structs§

DefaultPrimaryBackend 🔒

Functions§

backend_kind
Resolves the typed primary backend kind from one runtime config value.
build_default_primary_backend_registry
Builds default primary backend registry.
default_primary_backend_registry
Returns the immutable default primary-backend registry for shipped backends.
resolve_primary_backend
Resolves one shipped primary backend through the shared immutable registry.
valid_env_var_name 🔒
Performs valid env var name.
validate_backend_config
Validates one shared backend config before backend-specific connection setup.