Trait zephyr_sdk::DatabaseInteract

source ·
pub trait DatabaseInteract {
    // Required methods
    fn read_to_rows(env: &EnvClient) -> Vec<Self>
       where Self: Sized;
    fn put(&self, env: &EnvClient);
    fn update(&self, env: &EnvClient, conditions: &[Condition]);
}
Expand description

Trait that DatabaseDerive structures implement

Required Methods§

source

fn read_to_rows(env: &EnvClient) -> Vec<Self>
where Self: Sized,

Reads from the database into a vector of Self.

source

fn put(&self, env: &EnvClient)

Inserts a row Self into the database table.

source

fn update(&self, env: &EnvClient, conditions: &[Condition])

Updates an existing row with Self into the database table using the provided conditions as update filter.

Implementors§