mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 10:08:20 +00:00
use TempDatabase from commons in tests/
This commit is contained in:
parent
43c9fc3c5c
commit
300f278ff3
5 changed files with 29 additions and 15 deletions
|
@ -12,6 +12,13 @@ pub struct TempDatabase {
|
|||
|
||||
#[allow(dead_code, clippy::arc_with_non_send_sync)]
|
||||
impl TempDatabase {
|
||||
pub fn new_empty() -> Self {
|
||||
let mut path = TempDir::new().unwrap().into_path();
|
||||
path.push("test.db");
|
||||
let io: Arc<dyn limbo_core::IO> = Arc::new(limbo_core::PlatformIO::new().unwrap());
|
||||
|
||||
Self { path, io }
|
||||
}
|
||||
pub fn new(table_sql: &str) -> Self {
|
||||
let mut path = TempDir::new().unwrap().into_path();
|
||||
path.push("test.db");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue