Skip to main content

Crate floz_orm

Crate floz_orm 

Source
Expand description

§floz

A lightweight, typesafe Rust ORM that unifies DAO (Active Record) and DSL (Query Builder) APIs from a single schema! definition.

use floz::prelude::*;

floz::schema! {
    model User("users") {
        id:   integer("id").auto_increment().primary(),
        name: varchar("name", 100),
        age:  short("age"),
    }
}

Re-exports§

pub use sqlx;

Modules§

migration
prelude
Convenience re-exports for common floz usage.
types
ORM type aliases — semantic DB types that map to SQL.

Structs§

AnyColumn
A type-erased column reference for use in dynamic contexts (e.g., Value bindings, user_row!).
Column
A typed reference to a database column.
Db
A database connection pool that auto-selects the backend based on the connection URL scheme.
DeleteQuery
A DELETE query builder.
InsertManyQuery
A bulk INSERT query builder.
InsertQuery
A single-row INSERT query builder.
OrderExpr
An ordering expression for ORDER BY clauses.
PaginateQuery
Builder for paginated queries.
Paginated
The result of a paginated query.
SelectQuery
A SELECT query builder.
Tx
A database transaction.
UpdateQuery
An UPDATE query builder.

Enums§

Expr
A composable SQL expression node.
FlozError
All errors that can be returned by floz operations.
OrderDirection
The direction of an ORDER BY clause.
Value
Represents a SQL parameter value with full type information.

Traits§

Executor
The core database execution trait.
FlozHooks
Lifecycle hooks for database operations.
FlozRowBound

Attribute Macros§

model