Skip to main content

type_bridge/
lib.rs

1//! Public Rust client library for TypeBridge.
2//!
3//! Provides top-level [`Database`], [`ConnectionOptions`], [`SchemaPackage`],
4//! and owner-branded schema/model primitives.
5
6#![forbid(unsafe_code)]
7#![deny(missing_docs)]
8
9extern crate self as type_bridge;
10
11pub mod __codegen;
12pub mod aggregate;
13#[allow(dead_code)]
14mod entity_codec;
15mod entity_manager;
16pub mod error;
17pub mod hooks;
18pub mod model;
19mod query;
20#[allow(dead_code)]
21mod relation_codec;
22mod relation_manager;
23mod remote;
24pub mod schema;
25pub mod session;
26mod transaction;
27pub mod value;
28
29pub use entity_manager::{EntityManager, EntitySubtypeManager};
30pub use error::{
31    Error, ErrorCategory, ErrorDetail, ErrorDiagnostic, ErrorPathSegment, ModelValidationPhase,
32    Result,
33};
34pub use hooks::{
35    CrudOperation, HookContext, HookError, HookFuture, LifecycleHook, ModelKind, PreHookResult,
36};
37pub use query::{
38    Binding, BoundField, BoundRole, Collected, Exact, FieldGroupedQuery, GroupedQuery,
39    NamedSelection, Order, OrderedOperand, Page, PageOptions, Predicate, Query, QueryOperand,
40    QuerySession, RowsOptions, Selectable, SelectedRowSpec, SelectedShape, SelectedSlot,
41    SelectionMode, SingularSelectedShape, Subtypes,
42};
43pub use relation_manager::{RelationManager, RelationSubtypeManager};
44pub use remote::{
45    RemoteConnectionOptions, RemoteDatabase, RemoteQueryLimits, RemoteQueryTransport,
46};
47pub use schema::{Schema, SchemaPackage, Unbound};
48pub use session::{ConnectionOptions, Database};
49pub use transaction::{
50    ReadTransaction, TransactionEntityManager, TransactionRelationManager, WriteTransaction,
51};
52pub use type_bridge_orm_derive::SelectedRow;