Resolve

Trait Resolve 

Source
pub trait Resolve {
    // Required methods
    fn table_for_model(&self, model: &ModelRoot) -> Option<&Table>;
    fn model(&self, id: ModelId) -> Option<&Model>;
    fn table(&self, id: TableId) -> Option<&Table>;
}

Required Methods§

Source

fn table_for_model(&self, model: &ModelRoot) -> Option<&Table>

Source

fn model(&self, id: ModelId) -> Option<&Model>

Returns a reference to the application Model with the specified ID.

Used during high-level query building to access model metadata such as field definitions, relationships, and validation rules. Returns None if the model ID is not found in the application schema.

Source

fn table(&self, id: TableId) -> Option<&Table>

Returns a reference to the database Table with the specified ID.

Used during SQL generation and query execution to access table metadata including column definitions, constraints, and indexes. Returns None if the table ID is not found in the database schema.

Implementations on Foreign Types§

Source§

impl Resolve for ()

Source§

fn model(&self, _id: ModelId) -> Option<&Model>

Source§

fn table(&self, _id: TableId) -> Option<&Table>

Source§

fn table_for_model(&self, _model: &ModelRoot) -> Option<&Table>

Implementors§

Source§

impl Resolve for toasty_core::schema::db::Schema

Source§

impl Resolve for toasty_core::schema::Schema