Resolve

Trait Resolve 

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§

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

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.

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§

§

impl Resolve for ()

§

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

§

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

§

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

Implementors§

§

impl Resolve for Schema

§

impl Resolve for Schema