Rust

Undocumented.

Contents

use utopia_query::builder::core::Builder;
Rust
pub struct Builder<D: Dialect>

A query builder for one dialect: from a table, with queries (filters, ordering, pagination, aggregates, joins) and the builder's own clauses (subqueries, raw SQL, window functions, CTEs, unions), compiled by Builder::build into a Statement; also inserts, updates, deletes and upserts.

The dialects are type aliases: MySql and the others. Features only some dialects have are traits in feature.

Also implements Clone, Default.
use utopia_query::builder::core::Core;
Rust
pub struct Core

Undocumented.

use utopia_query::builder::core::ExistsSubquery;
Rust
pub struct ExistsSubquery

[NOT] EXISTS (subquery).

use utopia_query::builder::core::ExplainOptions;
Rust
pub struct ExplainOptions

The options of EXPLAIN beyond ANALYZE, for the dialects that have them.

use utopia_query::builder::core::LateralJoin;
Rust
pub struct LateralJoin

[LEFT] JOIN LATERAL (subquery) AS alias ON true.

use utopia_query::builder::core::SubSelect;
Rust
pub struct SubSelect

A builder used as a source: FROM (subquery) AS alias, a select-list subquery.

use utopia_query::builder::core::WhereInSubquery;
Rust
pub struct WhereInSubquery

Undocumented.

use utopia_query::builder::core::Dialect;
Rust
pub trait Dialect: Clone + Default + Send + Sync + Sized + 'static

Undocumented.

Rust
pub type AfterBuild = Arc<dyn Fn(Statement) -> Result<Statement> + Send + Sync>

A callback run on every built statement, returning the statement to use.

Rust
pub type BeforeBuild<D> = Arc<dyn Fn(&mut Builder<D>) -> Result<()> + Send + Sync>

A callback run at the start of every build, with the builder.