Skip to main content

Crate toolu_orm

Crate toolu_orm 

Source
Expand description

Single entry point for the toolu-orm workspace.

toolu-orm is a facade: it contains no logic of its own, only re-exports of the four library crates, all pinned to one version.

toolu-orm = { version = "0.1", features = ["postgres"] }
Re-exportCrateHolds
coretoolu-orm-coreschema, columns, migrations, driver traits
querytoolu-orm-queryselect / insert / update / delete builders
connectiontoolu-orm-connectionpools and driver adapters
table, ColumnEnum, FromRow, Relationaltoolu-orm-macrosproc macros

§Features

libsql, rusqlite and postgres forward to every re-exported crate, so one feature list drives the whole stack. Enable exactly one: toolu-orm-query compiles its executor and transaction code only for a single driver.

§Prelude

The proc macros expand to paths that name toolu_orm_core (and, for the generated query builders, toolu_orm_query) directly. Depending on toolu-orm alone does not put those crate names in scope, so import the prelude in every module that uses #[table] or a derive:

use toolu_orm::prelude::*;

#[table("users")]
pub struct User {
  pub id: i64,
  pub email: String,
}

Re-exports§

pub use toolu_orm_connection as connection;
pub use toolu_orm_core as core;
pub use toolu_orm_query as query;

Modules§

prelude
Everything a module needs to expand #[table] and the derives.

Attribute Macros§

table

Derive Macros§

ColumnEnum
FromRow
Relational