pub struct PostgresConnection {
pub url: String,
}Fields§
§url: StringImplementations§
Source§impl PostgresConnection
impl PostgresConnection
pub fn new(url: String) -> Self
pub async fn execute( &self, sql: &str, params: &[DsValue], ) -> Result<u64, DsError>
pub async fn query( &self, sql: &str, params: &[DsValue], ) -> Result<Vec<DsValue>, DsError>
pub async fn begin_transaction(self) -> Result<PostgresTransaction, DsError>
Trait Implementations§
Source§impl SchemaInspector for PostgresConnection
impl SchemaInspector for PostgresConnection
Auto Trait Implementations§
impl Freeze for PostgresConnection
impl RefUnwindSafe for PostgresConnection
impl Send for PostgresConnection
impl Sync for PostgresConnection
impl Unpin for PostgresConnection
impl UnsafeUnpin for PostgresConnection
impl UnwindSafe for PostgresConnection
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