Added empty table description.

This commit is contained in:
Jeff Baskin 2022-07-08 09:03:35 -04:00
parent e19c4c6c48
commit 5839cb93a2
1 changed files with 14 additions and 0 deletions

View File

@ -18,6 +18,10 @@ impl Table {
async fn name(&self) -> String {
self.name.to_string()
}
async fn describe(&self) -> Vec<u64> {
Vec::new()
}
}
struct Query;
@ -135,6 +139,16 @@ mod queries {
let expected = r#"{"data":{"tables":[{"name":"barney"},{"name":"fred"}]}}"#;
support::compare(&db, &output, &expected);
}
#[async_std::test]
async fn empty_table_description() {
let db = Database::new();
let output = db
.execute(r#"mutation {createTable(name: "pebbles"){name describe}}"#)
.await;
let expected = r#"{"data":{"createTable":{"name":"pebbles","describe":[]}}}"#;
support::compare(&db, &output, &expected);
}
}
#[cfg(test)]