Type Alias query_structure::prelude::Model

source ·
pub type Model = Zipper<ModelId>;

Aliased Type§

struct Model {
    pub id: ModelId,
    pub dm: InternalDataModel,
}

Fields§

§id: ModelId§dm: InternalDataModel

Implementations§

source§

impl Model

source

pub fn name(&self) -> &str

source

pub fn primary_identifier(&self) -> FieldSelection

Returns the set of fields to be used as the primary identifier for a record of that model. The identifier is nothing but an internal convention to have an anchor point for querying, or in other words, the identifier is not to be mistaken for a stable, external identifier, but has to be understood as implementation detail that is used to reason over a fixed set of fields.

source

pub fn fields(&self) -> Fields<'_>

source

pub fn supports_create_operation(&self) -> bool

source

pub fn db_name(&self) -> &str

The name of the model in the database For a sql database this will be the Table name for this model

source

pub fn db_name_opt(&self) -> Option<&str>

source

pub fn unique_indexes(&self) -> impl Iterator<Item = IndexWalker<'_>>

Trait Implementations§

source§

impl Debug for Model

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more