sqlx-database-tester-wsf

Crates.iosqlx-database-tester-wsf
lib.rssqlx-database-tester-wsf
version0.1.3
sourcesrc
created_at2023-12-02 03:47:09.630566
updated_at2023-12-02 04:54:29.71524
descriptiona simple tool to test sqlx with postgres, automatically create a database and drop it after test.
homepagehttps://github.com/wsfy15/
repositoryhttps://github.com/wsfy15/
max_upload_size
id1055880
size20,057
(wsfy15)

documentation

https://docs.rs/

README

sqlx-database-tester-wsf

sqlx tester for postgres, work with tokio only.

create one database at start of testing and destory after test ending.

How to use it

let tdb = TestDB::new("localhost", 5432, "postgres", "123456", "./migrations");
let pool = tdb.get_pool().await;
// do something with pool

// when tdb get dropped, the database will be dropped

Have fun with this crate!

License

This project is distributed under the terms of MIT.

See LICENSE for details.

Copyright 2021 SF Wu

Commit count: 0

cargo fmt