Skip to main content

Crate dbrest_core

Crate dbrest_core 

Source
Expand description

dbrest-core — database-agnostic core for the dbrest REST API

This crate provides the core traits, query generation, API handling, authentication, configuration, and schema cache logic. It does not contain any database-specific code (e.g. no sqlx, no PostgreSQL).

Re-exports§

pub use api_request::ApiRequest;
pub use app::AppState;
pub use app::Datasource;
pub use app::DbrestApp;
pub use app::DbrestRouters;
pub use app::start_server;
pub use auth::AuthResult;
pub use auth::AuthState;
pub use auth::JwtCache;
pub use backend::DatabaseBackend;
pub use backend::DbVersion;
pub use backend::PoolStatus;
pub use backend::SqlDialect;
pub use config::AppConfig;
pub use config::load_config;
pub use error::Error;
pub use plan::action_plan;
pub use routing::LocalRouter;
pub use routing::NamespaceId;
pub use routing::Route;
pub use routing::Router;
pub use routing::RoutingError;
pub use schema_cache::SchemaCache;
pub use schema_cache::SchemaCacheHolder;
pub use types::identifiers::QualifiedIdentifier;
pub use types::identifiers::RelIdentifier;
pub use types::media::MediaType;

Modules§

api_request
API Request module
app
Application module — HTTP server, routing, and request handling.
auth
JWT authentication module
backend
Database backend abstraction layer.
config
Configuration module
error
Error handling for dbrest
openapi
OpenAPI 3.0 specification generation
plan
Plan module for dbrest
query
Query builder module — transforms typed plans into parameterized SQL.
routing
Namespace routing abstractions.
schema_cache
Schema Cache module
types
Core types for dbrest

Macros§

bail
Early return with an error.
ensure
Ensure a condition is true, otherwise return an error.