Skip to main content

openauth_core/db/
mod.rs

1//! Database contracts, model metadata, and SQL naming defaults.
2
3mod adapter;
4#[doc(hidden)]
5pub mod adapter_harness;
6mod factory;
7mod hooks;
8mod id;
9mod memory;
10mod models;
11mod output;
12mod schema;
13pub mod sql;
14mod transform;
15
16pub use adapter::{
17    run_transaction_without_native_support, AdapterCapabilities, AdapterFuture, AdapterResult,
18    Connector, Count, Create, DbAdapter, DbRecord, DbValue, Delete, DeleteMany, FindMany, FindOne,
19    JoinConfig, JoinOn, JoinOption, JoinRelation, JoinResolution, SchemaCreation, Sort,
20    SortDirection, TransactionAdapter, TransactionCallback, Update, UpdateMany, Where, WhereMode,
21    WhereOperator,
22};
23pub use factory::JoinAdapter;
24pub use factory::SchemaAdapter;
25pub use hooks::HookedAdapter;
26pub use id::{IdGeneration, IdPolicy, IdValue};
27pub use memory::MemoryAdapter;
28pub use models::{Account, RateLimit, Session, User, Verification};
29pub use output::filter_output_fields;
30pub use schema::{
31    auth_schema, AuthSchemaOptions, DbField, DbFieldType, DbSchema, DbTable, ForeignKey, OnDelete,
32    RateLimitStorage, TableOptions,
33};
34pub use sql::{
35    consume_sql_rate_limit_record, count_statement, create_statement, delete_many_statement,
36    delete_one_statement, execute_schema_migration_plan, find_many_statement,
37    find_many_with_joins_statement, find_one_statement, plan_schema_migration,
38    rate_limit_consume_statements, update_many_statement, update_one_plan, ColumnToAdd,
39    DeleteOneStrategy, IndexToCreate, MigrationStatement, MigrationStatementKind,
40    SchemaMigrationPlan, SchemaMigrationWarning, SqlAdapterRunner, SqlColumnSnapshot,
41    SqlDeleteOnePlan, SqlDialect, SqlExecutor, SqlFragment, SqlJoinReadStatement, SqlParam,
42    SqlRateLimitNames, SqlRateLimitPlan, SqlReadStatement, SqlRowReader, SqlSchemaSnapshot,
43    SqlSelectedField, SqlStatement, SqlUpdateOnePlan, TableToCreate,
44};
45pub use transform::{
46    resolve_join_options, transform_count_query, transform_count_query_with_capabilities,
47    transform_create_query, transform_create_query_with_capabilities, transform_delete_many_query,
48    transform_delete_many_query_with_capabilities, transform_delete_query,
49    transform_delete_query_with_capabilities, transform_find_many_query,
50    transform_find_many_query_with_capabilities, transform_find_one_query,
51    transform_find_one_query_with_capabilities, transform_update_many_query,
52    transform_update_many_query_with_capabilities, transform_update_query,
53    transform_update_query_with_capabilities,
54};