Skip to main content

QueryModel

Trait QueryModel 

Source
pub trait QueryModel: EntityTrait {
    // Provided method
    fn query(db: &Db) -> Query<'_, Self> { ... }
}
Expand description

The golden-path entry point: every SeaORM Entity gains Entity::query(&db).

This is a blanket implementation over sea_orm::EntityTrait — applications do not implement it by hand, and no #[model] macro is required (PROGRAM.md AP2.1-6; the macro is deferred to a later AP2.1 phase). The trait adds the single query associated function; all other ergonomics live on Query<E> and the free functions crate::find_by_pk, crate::insert, crate::update, crate::delete.

Provided Methods§

Source

fn query(db: &Db) -> Query<'_, Self>

Start a typed query over this entity, bound to the explicit db.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<E> QueryModel for E
where E: EntityTrait,