pub struct Pool(_, _);
Implementations
sourceimpl Pool
impl Pool
pub fn new(cfg: AkitaConfig) -> Result<Self, AkitaError>
pub fn get_pool(&self) -> Result<PlatformPool, AkitaError>
pub fn config(&self) -> &AkitaConfig
sourcepub fn connect(&mut self) -> Result<PooledConnection, AkitaError>
pub fn connect(&mut self) -> Result<PooledConnection, AkitaError>
get a usable database connection from
sourcepub fn entity_manager(&self) -> Result<AkitaEntityManager, AkitaError>
pub fn entity_manager(&self) -> Result<AkitaEntityManager, AkitaError>
return an entity manager which provides a higher level api
sourcepub fn connect_mut(&self) -> Result<PooledConnection, AkitaError>
pub fn connect_mut(&self) -> Result<PooledConnection, AkitaError>
get a usable database connection from
sourcepub fn database(&self) -> Result<DatabasePlatform, AkitaError>
pub fn database(&self) -> Result<DatabasePlatform, AkitaError>
get a database instance with a connection, ready to send sql statements
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Pool
impl Send for Pool
impl Sync for Pool
impl Unpin for Pool
impl !UnwindSafe for Pool
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more