Trait geekorm_core::TablePrimaryKey
source · pub trait TablePrimaryKey{
// Required methods
fn primary_key() -> String;
fn primary_key_value(&self) -> Value;
// Provided method
fn query_select_by_primary_key(pk: impl Into<Value>) -> Query { ... }
}
Expand description
Trait for Tables with a primary key
Required Methods§
sourcefn primary_key() -> String
fn primary_key() -> String
Get the name of the primary key column
sourcefn primary_key_value(&self) -> Value
fn primary_key_value(&self) -> Value
Get the primary key column name
Provided Methods§
sourcefn query_select_by_primary_key(pk: impl Into<Value>) -> Query
fn query_select_by_primary_key(pk: impl Into<Value>) -> Query
Select a row by the primary key
Object Safety§
This trait is not object safe.