CommandExecutor

Trait CommandExecutor 

Source
pub trait CommandExecutor: SqlExecutor + Debug {
    type G: SqlGenerator + Sync + Debug;

Show 18 methods // Required method fn get_generator(&self) -> &Self::G; // Provided methods async fn select<SE>( &mut self, primary: &dyn Primary, selection: &dyn Selection, ) -> LunaOrmResult<Option<SE>> where SE: SelectedEntity + Send + Unpin { ... } async fn create<'a>( &mut self, entity: &'a mut dyn Entity, ) -> LunaOrmResult<bool> { ... } async fn insert(&mut self, entity: &dyn Entity) -> LunaOrmResult<bool> { ... } async fn upsert(&mut self, entity: &dyn Entity) -> LunaOrmResult<bool> { ... } async fn update( &mut self, mutation: &dyn Mutation, primary: &dyn Primary, ) -> LunaOrmResult<bool> { ... } async fn delete(&mut self, primary: &dyn Primary) -> LunaOrmResult<bool> { ... } async fn search_all<SE>( &mut self, selection: &dyn Selection, ) -> LunaOrmResult<Vec<SE>> where SE: SelectedEntity + Send + Unpin { ... } async fn search<SE>( &mut self, location: &dyn Location, order_by: Option<&dyn OrderBy>, selection: &dyn Selection, ) -> LunaOrmResult<Vec<SE>> where SE: SelectedEntity + Send + Unpin { ... } async fn count(&mut self, location: &dyn Location) -> LunaOrmResult<usize> { ... } async fn search_paged<SE>( &mut self, location: &dyn Location, order_by: Option<&dyn OrderBy>, selection: &dyn Selection, page: &Pagination, ) -> LunaOrmResult<PagedList<SE>> where SE: SelectedEntity + Send + Unpin { ... } async fn search_joined<SE>( &mut self, joined_conds: JoinedConditions, locations: Vec<&dyn Location>, order_by: Option<&dyn OrderBy>, selections: Vec<&dyn Selection>, page: &Pagination, ) -> String { ... } async fn purify(&mut self, location: &dyn Location) -> LunaOrmResult<usize> { ... } async fn change( &mut self, mutation: &dyn Mutation, location: &dyn Location, ) -> LunaOrmResult<usize> { ... } async fn execute_by_template( &mut self, template: &dyn TemplateRecord, ) -> LunaOrmResult<usize> { ... } async fn select_by_template<SE>( &mut self, template: &dyn TemplateRecord, ) -> LunaOrmResult<Option<SE>> where SE: SelectedEntity + Send + Unpin { ... } async fn search_by_template<SE>( &mut self, template: &dyn TemplateRecord, ) -> LunaOrmResult<Vec<SE>> where SE: SelectedEntity + Send + Unpin { ... } async fn search_paged_by_template<SE>( &mut self, template: &dyn TemplateRecord, page: &Pagination, ) -> LunaOrmResult<PagedList<SE>> where SE: SelectedEntity + Send + Unpin { ... }
}

Required Associated Types§

Required Methods§

Source

fn get_generator(&self) -> &Self::G

Provided Methods§

Source

async fn select<SE>( &mut self, primary: &dyn Primary, selection: &dyn Selection, ) -> LunaOrmResult<Option<SE>>
where SE: SelectedEntity + Send + Unpin,

Source

async fn create<'a>( &mut self, entity: &'a mut dyn Entity, ) -> LunaOrmResult<bool>

Source

async fn insert(&mut self, entity: &dyn Entity) -> LunaOrmResult<bool>

Source

async fn upsert(&mut self, entity: &dyn Entity) -> LunaOrmResult<bool>

Source

async fn update( &mut self, mutation: &dyn Mutation, primary: &dyn Primary, ) -> LunaOrmResult<bool>

Source

async fn delete(&mut self, primary: &dyn Primary) -> LunaOrmResult<bool>

Source

async fn search_all<SE>( &mut self, selection: &dyn Selection, ) -> LunaOrmResult<Vec<SE>>
where SE: SelectedEntity + Send + Unpin,

Source

async fn search<SE>( &mut self, location: &dyn Location, order_by: Option<&dyn OrderBy>, selection: &dyn Selection, ) -> LunaOrmResult<Vec<SE>>
where SE: SelectedEntity + Send + Unpin,

Source

async fn count(&mut self, location: &dyn Location) -> LunaOrmResult<usize>

Source

async fn search_paged<SE>( &mut self, location: &dyn Location, order_by: Option<&dyn OrderBy>, selection: &dyn Selection, page: &Pagination, ) -> LunaOrmResult<PagedList<SE>>
where SE: SelectedEntity + Send + Unpin,

Source

async fn search_joined<SE>( &mut self, joined_conds: JoinedConditions, locations: Vec<&dyn Location>, order_by: Option<&dyn OrderBy>, selections: Vec<&dyn Selection>, page: &Pagination, ) -> String

Source

async fn purify(&mut self, location: &dyn Location) -> LunaOrmResult<usize>

Source

async fn change( &mut self, mutation: &dyn Mutation, location: &dyn Location, ) -> LunaOrmResult<usize>

Source

async fn execute_by_template( &mut self, template: &dyn TemplateRecord, ) -> LunaOrmResult<usize>

Source

async fn select_by_template<SE>( &mut self, template: &dyn TemplateRecord, ) -> LunaOrmResult<Option<SE>>
where SE: SelectedEntity + Send + Unpin,

Source

async fn search_by_template<SE>( &mut self, template: &dyn TemplateRecord, ) -> LunaOrmResult<Vec<SE>>
where SE: SelectedEntity + Send + Unpin,

Source

async fn search_paged_by_template<SE>( &mut self, template: &dyn TemplateRecord, page: &Pagination, ) -> LunaOrmResult<PagedList<SE>>
where SE: SelectedEntity + Send + Unpin,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§