Struct sqlx_db_tester::TestPg
source · pub struct TestPg {
pub server_url: String,
pub dbname: String,
}
Fields§
§server_url: String
§dbname: String
Implementations§
source§impl TestPg
impl TestPg
pub fn new<S>(server_url: String, migrations: S) -> Self
pub fn server_url(&self) -> String
pub fn url(&self) -> String
pub async fn get_pool(&self) -> PgPool
pub async fn load_csv( &self, table: &str, fields: &[&str], filename: &Path ) -> Result<()>
pub async fn load_csv_data(&self, table: &str, csv: &str) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for TestPg
impl Send for TestPg
impl Sync for TestPg
impl Unpin for TestPg
impl UnwindSafe for TestPg
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