WriterApi

Trait WriterApi 

Source
pub trait WriterApi: SqlExecutor<Postgres> {
    // Provided methods
    async fn insert(&self, entity: &dyn PostgresEntity) -> Result<()> { ... }
    async fn upsert(&self, entity: &dyn PostgresEntity) -> Result<()> { ... }
    async fn create(&self, entity: &mut dyn PostgresEntity) -> Result<()> { ... }
    async fn update<M: PostgresMutation>(
        &self,
        mutation: &M,
        unique: &dyn PostgresUnique<Mutation = M>,
    ) -> Result<bool> { ... }
    async fn change(
        &self,
        mutation: &dyn PostgresMutation,
        location: &dyn PostgresLocation,
    ) -> Result<u64> { ... }
    async fn delete<M: PostgresMutation>(
        &self,
        unique: &dyn PostgresUnique<Mutation = M>,
    ) -> Result<bool> { ... }
    async fn purify(&self, location: &dyn PostgresLocation) -> Result<u64> { ... }
}

Provided Methods§

Source

async fn insert(&self, entity: &dyn PostgresEntity) -> Result<()>

Source

async fn upsert(&self, entity: &dyn PostgresEntity) -> Result<()>

Source

async fn create(&self, entity: &mut dyn PostgresEntity) -> Result<()>

Source

async fn update<M: PostgresMutation>( &self, mutation: &M, unique: &dyn PostgresUnique<Mutation = M>, ) -> Result<bool>

Source

async fn change( &self, mutation: &dyn PostgresMutation, location: &dyn PostgresLocation, ) -> Result<u64>

Source

async fn delete<M: PostgresMutation>( &self, unique: &dyn PostgresUnique<Mutation = M>, ) -> Result<bool>

Source

async fn purify(&self, location: &dyn PostgresLocation) -> Result<u64>

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§

Source§

impl<T> WriterApi for T