Struct luna_orm::prelude::postgres::PostgresDatabase
source · 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
fn select<'life0, 'life1, 'life2, 'async_trait, SE>(
&'life0 mut self,
primary: &'life1 dyn Primary,
selection: &'life2 dyn Selection
) -> Pin<Box<dyn Future<Output = LunaOrmResult<Option<SE>>> + Send + 'async_trait>>where
SE: SelectedEntity + Send + Unpin + 'async_trait,
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn create<'a, 'life0, 'async_trait>(
&'life0 mut self,
entity: &'a dyn Entity
) -> Pin<Box<dyn Future<Output = LunaOrmResult<&'a dyn Entity>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
fn insert<'life0, 'life1, 'async_trait>(
&'life0 mut self,
entity: &'life1 dyn Entity
) -> Pin<Box<dyn Future<Output = LunaOrmResult<bool>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn upsert<'life0, 'life1, 'async_trait>(
&'life0 mut self,
entity: &'life1 dyn Entity
) -> Pin<Box<dyn Future<Output = LunaOrmResult<bool>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mutation: &'life1 dyn Mutation,
primary: &'life2 dyn Primary
) -> Pin<Box<dyn Future<Output = LunaOrmResult<bool>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 mut self,
primary: &'life1 dyn Primary
) -> Pin<Box<dyn Future<Output = LunaOrmResult<bool>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search<'life0, 'life1, 'life2, 'life3, 'async_trait, SE>(
&'life0 mut self,
location: &'life1 dyn Location,
order_by: Option<&'life2 dyn OrderBy>,
selection: &'life3 dyn Selection
) -> Pin<Box<dyn Future<Output = LunaOrmResult<Vec<SE>>> + Send + 'async_trait>>where
SE: SelectedEntity + Send + Unpin + 'async_trait,
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn count<'life0, 'life1, 'async_trait>(
&'life0 mut self,
location: &'life1 dyn Location
) -> Pin<Box<dyn Future<Output = LunaOrmResult<usize>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search_paged<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, SE>(
&'life0 mut self,
location: &'life1 dyn Location,
order_by: Option<&'life2 dyn OrderBy>,
selection: &'life3 dyn Selection,
page: &'life4 Pagination
) -> Pin<Box<dyn Future<Output = LunaOrmResult<PagedList<SE>>> + Send + 'async_trait>>where
SE: SelectedEntity + Send + Unpin + 'async_trait,
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn search_joined<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, SE>(
&'life0 mut self,
joined_conds: JoinedConditions,
locations: Vec<&'life1 dyn Location>,
order_by: Option<&'life2 dyn OrderBy>,
selections: Vec<&'life3 dyn Selection>,
page: &'life4 Pagination
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>where
SE: 'async_trait,
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn purify<'life0, 'life1, 'async_trait>(
&'life0 mut self,
location: &'life1 dyn Location
) -> Pin<Box<dyn Future<Output = LunaOrmResult<usize>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn change<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mutation: &'life1 dyn Mutation,
location: &'life2 dyn Location
) -> Pin<Box<dyn Future<Output = LunaOrmResult<usize>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute_by_template<'life0, 'life1, 'async_trait>(
&'life0 mut self,
template: &'life1 dyn TemplateRecord
) -> Pin<Box<dyn Future<Output = LunaOrmResult<usize>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn select_by_template<'life0, 'life1, 'async_trait, SE>(
&'life0 mut self,
template: &'life1 dyn TemplateRecord
) -> Pin<Box<dyn Future<Output = LunaOrmResult<Option<SE>>> + Send + 'async_trait>>where
SE: SelectedEntity + Send + Unpin + 'async_trait,
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search_by_template<'life0, 'life1, 'async_trait, SE>(
&'life0 mut self,
template: &'life1 dyn TemplateRecord
) -> Pin<Box<dyn Future<Output = LunaOrmResult<Vec<SE>>> + Send + 'async_trait>>where
SE: SelectedEntity + Send + Unpin + 'async_trait,
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search_paged_by_template<'life0, 'life1, 'life2, 'async_trait, SE>(
&'life0 mut self,
template: &'life1 dyn TemplateRecord,
page: &'life2 Pagination
) -> Pin<Box<dyn Future<Output = LunaOrmResult<PagedList<SE>>> + Send + 'async_trait>>where
SE: SelectedEntity + Send + Unpin + 'async_trait,
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
source§impl Database for PostgresDatabase
impl Database for PostgresDatabase
fn get_type(&self) -> &DatabaseType
fn transaction<'a, 'async_trait>(
&'a self
) -> Pin<Box<dyn Future<Output = LunaOrmResult<Transaction<'a, Self::G>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'a: 'async_trait,
fn remove<'life0, 'life1, 'life2, 'async_trait, SE>(
&'life0 mut self,
primary: &'life1 dyn Primary,
selection: &'life2 dyn Selection
) -> Pin<Box<dyn Future<Output = LunaOrmResult<Option<SE>>> + Send + 'async_trait>>where
SE: SelectedEntity + Send + Unpin + 'async_trait,
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn transact<'life0, 'life1, 'async_trait>(
&'life0 mut self,
commands: &'life1 [WriteCommand]
) -> Pin<Box<dyn Future<Output = LunaOrmResult<bool>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
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>
fn fetch_optional_plain<'life0, 'life1, 'async_trait, SE>(
&'life0 mut self,
stmt: &'life1 str
) -> Pin<Box<dyn Future<Output = LunaOrmResult<Option<SE>>> + Send + 'async_trait>>where
SE: SelectedEntity + Send + Unpin + 'async_trait,
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_optional<'life0, 'life1, 'life2, 'async_trait, SE>(
&'life0 mut self,
stmt: &'life1 str,
args: AnyArguments<'life2>
) -> Pin<Box<dyn Future<Output = LunaOrmResult<Option<SE>>> + Send + 'async_trait>>where
SE: SelectedEntity + Send + Unpin + 'async_trait,
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fetch_all_plain<'life0, 'life1, 'async_trait, SE>(
&'life0 mut self,
stmt: &'life1 str
) -> Pin<Box<dyn Future<Output = LunaOrmResult<Vec<SE>>> + Send + 'async_trait>>where
SE: SelectedEntity + Send + Unpin + 'async_trait,
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_all<'life0, 'life1, 'life2, 'async_trait, SE>(
&'life0 mut self,
stmt: &'life1 str,
args: AnyArguments<'life2>
) -> Pin<Box<dyn Future<Output = LunaOrmResult<Vec<SE>>> + Send + 'async_trait>>where
SE: SelectedEntity + Send + Unpin + 'async_trait,
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
stmt: &'life1 str,
args: AnyArguments<'life2>
) -> Pin<Box<dyn Future<Output = LunaOrmResult<AnyQueryResult>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute_plain<'life0, 'life1, 'async_trait>(
&'life0 mut self,
stmt: &'life1 str
) -> Pin<Box<dyn Future<Output = LunaOrmResult<AnyQueryResult>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
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