Skip to main content

RepositoryBehavior

Trait RepositoryBehavior 

Source
pub trait RepositoryBehavior: Send + Sync {
    // Provided methods
    fn before_select(
        &self,
        _ctx: &UserContext,
        _query: &mut SelectQuery,
    ) -> Result<(), RuntimeError> { ... }
    fn before_insert(
        &self,
        _ctx: &UserContext,
        _command: &mut InsertCommand,
    ) -> Result<(), RuntimeError> { ... }
    fn before_update(
        &self,
        _ctx: &UserContext,
        _command: &mut UpdateCommand,
    ) -> Result<(), RuntimeError> { ... }
    fn before_delete(
        &self,
        _ctx: &UserContext,
        _command: &mut DeleteCommand,
    ) -> Result<(), RuntimeError> { ... }
    fn before_recover(
        &self,
        _ctx: &UserContext,
        _command: &mut RecoverCommand,
    ) -> Result<(), RuntimeError> { ... }
    fn relation_loads(&self, _ctx: &UserContext) -> Vec<String> { ... }
}

Provided Methods§

Source

fn before_select( &self, _ctx: &UserContext, _query: &mut SelectQuery, ) -> Result<(), RuntimeError>

Source

fn before_insert( &self, _ctx: &UserContext, _command: &mut InsertCommand, ) -> Result<(), RuntimeError>

Source

fn before_update( &self, _ctx: &UserContext, _command: &mut UpdateCommand, ) -> Result<(), RuntimeError>

Source

fn before_delete( &self, _ctx: &UserContext, _command: &mut DeleteCommand, ) -> Result<(), RuntimeError>

Source

fn before_recover( &self, _ctx: &UserContext, _command: &mut RecoverCommand, ) -> Result<(), RuntimeError>

Source

fn relation_loads(&self, _ctx: &UserContext) -> Vec<String>

Implementors§