pub struct OliphauntBuilder { /* private fields */ }Expand description
Builder for opening persistent or temporary Oliphaunt databases.
Implementations§
Source§impl OliphauntBuilder
impl OliphauntBuilder
Sourcepub fn app(
self,
qualifier: impl Into<String>,
organization: impl Into<String>,
application: impl Into<String>,
) -> Self
pub fn app( self, qualifier: impl Into<String>, organization: impl Into<String>, application: impl Into<String>, ) -> Self
Open a persistent database under the platform data directory.
Sourcepub fn app_id(self, app_id: (&str, &str, &str)) -> Self
pub fn app_id(self, app_id: (&str, &str, &str)) -> Self
Open a persistent database under the platform data directory.
Sourcepub fn temporary(self) -> Self
pub fn temporary(self) -> Self
Open an ephemeral database removed when the instance is dropped.
Temporary databases use the process-local template cluster cache by
default, avoiding repeated initdb work in test suites.
Sourcepub fn template_cache(self, enabled: bool) -> Self
pub fn template_cache(self, enabled: bool) -> Self
Control whether new databases are cloned from the process-local or embedded PGDATA template cache.
Sourcepub fn fresh_temporary(self) -> Self
pub fn fresh_temporary(self) -> Self
Open an ephemeral database with a fresh initdb.
This is a compatibility alias for
temporary().template_cache(false). Fresh initdb uses the bundled split
WASIX initdb module; cached temporary databases remain the production
fast path.
Sourcepub fn postgres_config(
self,
name: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn postgres_config( self, name: impl Into<String>, value: impl Into<String>, ) -> Self
Set a PostgreSQL startup GUC for this embedded backend.
Sourcepub fn postgres_configs<K, V>(
self,
settings: impl IntoIterator<Item = (K, V)>,
) -> Self
pub fn postgres_configs<K, V>( self, settings: impl IntoIterator<Item = (K, V)>, ) -> Self
Set multiple PostgreSQL startup GUCs for this embedded backend.
Sourcepub fn username(self, username: impl Into<String>) -> Self
pub fn username(self, username: impl Into<String>) -> Self
Connect as a PostgreSQL role. The role must already exist in the cluster.
Sourcepub fn database(self, database: impl Into<String>) -> Self
pub fn database(self, database: impl Into<String>) -> Self
Connect to a PostgreSQL database. The database must already exist in the cluster.
Sourcepub fn debug_level(self, level: DebugLevel) -> Self
pub fn debug_level(self, level: DebugLevel) -> Self
Enable PostgreSQL debug logging level 0..=5 for the embedded backend.
Sourcepub fn relaxed_durability(self, enabled: bool) -> Self
pub fn relaxed_durability(self, enabled: bool) -> Self
Use lower durability settings for ephemeral or cacheable local workloads.
Sourcepub fn startup_arg(self, arg: impl Into<String>) -> Self
pub fn startup_arg(self, arg: impl Into<String>) -> Self
Append an advanced PostgreSQL startup argument. Prefer
postgres_config for GUCs.
Sourcepub fn startup_args(
self,
args: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn startup_args( self, args: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Append advanced PostgreSQL startup arguments.
Sourcepub fn load_data_dir_archive(self, archive: impl Into<Vec<u8>>) -> Self
pub fn load_data_dir_archive(self, archive: impl Into<Vec<u8>>) -> Self
Load a previously dumped PGDATA tar archive before opening the database.
Trait Implementations§
Source§impl Clone for OliphauntBuilder
impl Clone for OliphauntBuilder
Source§fn clone(&self) -> OliphauntBuilder
fn clone(&self) -> OliphauntBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OliphauntBuilder
impl Debug for OliphauntBuilder
Auto Trait Implementations§
impl Freeze for OliphauntBuilder
impl RefUnwindSafe for OliphauntBuilder
impl Send for OliphauntBuilder
impl Sync for OliphauntBuilder
impl Unpin for OliphauntBuilder
impl UnsafeUnpin for OliphauntBuilder
impl UnwindSafe for OliphauntBuilder
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.