diff --git a/src/lib.rs b/src/lib.rs index a9769d7..72f49ed 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,4 +5,26 @@ impl Database { pub fn new() -> Self { Self {} } + + pub async fn query(&self, _qry: &str) -> String { + "{data{}}".to_string() + } +} + +#[cfg(test)] +mod queries { + use super::*; + + #[async_std::test] + async fn empty_table_query() { + let expected = "{data{}}"; + let testdb = Database::new(); + let output = testdb.query("{tables{name}}").await; + assert!( + output == expected, + "Got '{}' expected '{}'.", + output, + expected + ); + } }