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
impl Model
pub fn name(&self) -> &str
sourcepub fn primary_identifier(&self) -> FieldSelection
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.
pub fn fields(&self) -> Fields<'_>
pub fn supports_create_operation(&self) -> bool
sourcepub fn db_name(&self) -> &str
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