Getting started
Generate the client
rent generateThe command reads rent/schema.rsl (or a configured multi-file RSL directory). The generated tree contains models, create/update/delete/query builders, compact field filters, composable predicates, relation loaders, and a transaction client.
Use compact methods for ordinary queries:
client
.user()
.email_eq("ada@example.com")
.only()
.await?;Use predicate modules when an expression must be stored, combined dynamically, or reused:
let active_adult = rent::sql::ast::and([
user_predicate::active_eq(true),
user_predicate::age_ge(18),
]);
client.user().where_(active_adult).all().await?;Predicates are typed SQL expression values. Most developers do not need to name them for straightforward filters.