mod builder;
mod bulk;
pub mod changeset;
mod client;
mod condition;
mod cte;
pub mod eager;
mod error;
mod ident;
pub mod monitor;
pub mod prelude;
pub mod qb;
mod row;
mod sql;
mod transaction;
pub mod types;
#[cfg(feature = "validate")]
pub mod validate;
#[cfg(feature = "migrate")]
pub mod migrate;
pub use builder::{
Cursor, Keyset1, Keyset2, NullsOrder, OrderBy, OrderItem, Pagination, SortDir, WhereExpr,
};
pub use condition::{Condition, Op};
pub use cte::WithBuilder;
pub use sql::{FromRowStream, Query, Sql, query, sql};
pub use row::{FromRow, PgType, RowExt};
pub use tokio_postgres::types::Json;
pub use types::{Bound, Range};
pub use client::{GenericClient, RowStream, StreamingClient};
pub use bulk::{DeleteManyBuilder, SetExpr, UpdateManyBuilder};
pub use ident::{Ident, IdentPart, IntoIdent};
pub use eager::{BelongsToMap, HasManyMap, HasOneMap, Loaded};
pub use transaction::{__next_savepoint_name, Savepoint, TransactionExt};
pub use changeset::{ValidationCode, ValidationError, ValidationErrors};
pub use error::{OrmError, OrmResult};
#[cfg(feature = "migrate")]
pub use migrate::{Migration, Report, Runner, Target, embed_migrations};
#[cfg(feature = "pool")]
mod pool;
#[cfg(feature = "pool")]
pub use client::PoolClient;
#[cfg(feature = "pool")]
pub use pool::{create_pool, create_pool_with_config};
#[cfg(feature = "pool")]
pub use pool::{create_pool_with_manager_config, create_pool_with_tls};
#[cfg(feature = "derive")]
pub use pgorm_derive::{
FromRow, InsertModel, Model, PgComposite, PgEnum, QueryParams, UpdateModel, ViewModel,
};
pub mod check;
mod checked_client;
#[cfg(feature = "check")]
mod pg_client;
pub use check::{ColumnMeta, SchemaRegistry, TableMeta, TableSchema};
#[doc(hidden)]
pub use inventory;
#[doc(hidden)]
pub use serde;
#[doc(hidden)]
pub use checked_client::ModelRegistration;
#[cfg(feature = "check")]
pub use pg_client::{
CheckMode, DangerousDmlPolicy, ModelCheckResult, PgClient, PgClientConfig,
SelectWithoutLimitPolicy, SqlPolicy, StatementCacheConfig, StmtCacheStats,
};
pub trait ModelPk {
type Id: Clone + Send + Sync + 'static;
fn pk(&self) -> &Self::Id;
}
#[derive(Debug, Clone)]
pub struct WriteReport<R> {
pub affected: u64,
pub steps: ::std::vec::Vec<WriteStepReport>,
pub root: ::std::option::Option<R>,
}
#[derive(Debug, Clone)]
pub struct WriteStepReport {
pub tag: &'static str,
pub affected: u64,
}