pub struct PostgresDatabase { /* private fields */ }Implementations§
Trait Implementations§
Source§impl CommandExecutor for PostgresDatabase
impl CommandExecutor for PostgresDatabase
type G = PostgresGenerator
fn get_generator(&self) -> &Self::G
async fn create<'a>( &mut self, entity: &'a mut dyn Entity, ) -> LunaOrmResult<bool>
async fn select<SE>( &mut self, primary: &dyn Primary, selection: &dyn Selection, ) -> LunaOrmResult<Option<SE>>
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>>
async fn search<SE>( &mut self, location: &dyn Location, order_by: Option<&dyn OrderBy>, selection: &dyn Selection, ) -> LunaOrmResult<Vec<SE>>
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>>
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>>
async fn search_by_template<SE>( &mut self, template: &dyn TemplateRecord, ) -> LunaOrmResult<Vec<SE>>
async fn search_paged_by_template<SE>( &mut self, template: &dyn TemplateRecord, page: &Pagination, ) -> LunaOrmResult<PagedList<SE>>
Source§impl Database for PostgresDatabase
impl Database for PostgresDatabase
fn get_type(&self) -> &DatabaseType
async fn transaction<'a>(&'a self) -> LunaOrmResult<Transaction<'a, Self::G>>
async fn remove<SE>( &mut self, primary: &dyn Primary, selection: &dyn Selection, ) -> LunaOrmResult<Option<SE>>
async fn transact(&mut self, commands: &[WriteCommand]) -> LunaOrmResult<bool>
Source§impl Debug for PostgresDatabase
impl Debug for PostgresDatabase
Source§impl From<PostgresDatabase> for DB<PostgresDatabase>
impl From<PostgresDatabase> for DB<PostgresDatabase>
Source§fn from(value: PostgresDatabase) -> Self
fn from(value: PostgresDatabase) -> Self
Converts to this type from the input type.
Source§impl SqlExecutor for PostgresDatabase
impl SqlExecutor for PostgresDatabase
fn get_pool(&self) -> LunaOrmResult<&AnyPool>
async fn fetch_one_plain<SE>(&mut self, stmt: &str) -> LunaOrmResult<SE>
async fn fetch_one<SE>( &mut self, stmt: &str, args: AnyArguments<'_>, ) -> LunaOrmResult<SE>
async fn fetch_optional_plain<SE>( &mut self, stmt: &str, ) -> LunaOrmResult<Option<SE>>
async fn fetch_optional<SE>( &mut self, stmt: &str, args: AnyArguments<'_>, ) -> LunaOrmResult<Option<SE>>
async fn fetch_all_plain<SE>(&mut self, stmt: &str) -> LunaOrmResult<Vec<SE>>
async fn fetch_all<SE>( &mut self, stmt: &str, args: AnyArguments<'_>, ) -> LunaOrmResult<Vec<SE>>
async fn execute( &mut self, stmt: &str, args: AnyArguments<'_>, ) -> LunaOrmResult<AnyQueryResult>
async fn execute_plain(&mut self, stmt: &str) -> LunaOrmResult<AnyQueryResult>
Auto Trait Implementations§
impl Freeze for PostgresDatabase
impl !RefUnwindSafe for PostgresDatabase
impl Send for PostgresDatabase
impl Sync for PostgresDatabase
impl Unpin for PostgresDatabase
impl !UnwindSafe for PostgresDatabase
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more