From 05a95df56debd4f3d0f441c5c9fc72ff68f694e1 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Tue, 30 Jul 2024 07:46:35 +0100 Subject: [PATCH] Remove unnecessary backticks from `INFO FOR` statement output (#4438) --- core/src/sql/statements/info.rs | 34 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/core/src/sql/statements/info.rs b/core/src/sql/statements/info.rs index c9523037..f8f53b8a 100644 --- a/core/src/sql/statements/info.rs +++ b/core/src/sql/statements/info.rs @@ -89,14 +89,14 @@ impl InfoStatement { "accesses".to_string() => { let mut out = Object::default(); for v in txn.all_root_accesses().await?.iter().map(|v| v.redacted()) { - out.insert(v.name.to_string(), v.to_string().into()); + out.insert(v.name.to_raw(), v.to_string().into()); } out.into() }, "namespaces".to_string() => { let mut out = Object::default(); for v in txn.all_ns().await?.iter() { - out.insert(v.name.to_string(), v.to_string().into()); + out.insert(v.name.to_raw(), v.to_string().into()); } out.into() }, @@ -110,7 +110,7 @@ impl InfoStatement { "users".to_string() => { let mut out = Object::default(); for v in txn.all_root_users().await?.iter() { - out.insert(v.name.to_string(), v.to_string().into()); + out.insert(v.name.to_raw(), v.to_string().into()); } out.into() }, @@ -135,21 +135,21 @@ impl InfoStatement { "accesses".to_string() => { let mut out = Object::default(); for v in txn.all_ns_accesses(ns).await?.iter().map(|v| v.redacted()) { - out.insert(v.name.to_string(), v.to_string().into()); + out.insert(v.name.to_raw(), v.to_string().into()); } out.into() }, "databases".to_string() => { let mut out = Object::default(); for v in txn.all_db(ns).await?.iter() { - out.insert(v.name.to_string(), v.to_string().into()); + out.insert(v.name.to_raw(), v.to_string().into()); } out.into() }, "users".to_string() => { let mut out = Object::default(); for v in txn.all_ns_users(ns).await?.iter() { - out.insert(v.name.to_string(), v.to_string().into()); + out.insert(v.name.to_raw(), v.to_string().into()); } out.into() }, @@ -179,49 +179,49 @@ impl InfoStatement { "accesses".to_string() => { let mut out = Object::default(); for v in txn.all_db_accesses(ns, db).await?.iter().map(|v| v.redacted()) { - out.insert(v.name.to_string(), v.to_string().into()); + out.insert(v.name.to_raw(), v.to_string().into()); } out.into() }, "analyzers".to_string() => { let mut out = Object::default(); for v in txn.all_db_analyzers(ns, db).await?.iter() { - out.insert(v.name.to_string(), v.to_string().into()); + out.insert(v.name.to_raw(), v.to_string().into()); } out.into() }, "functions".to_string() => { let mut out = Object::default(); for v in txn.all_db_functions(ns, db).await?.iter() { - out.insert(v.name.to_string(), v.to_string().into()); + out.insert(v.name.to_raw(), v.to_string().into()); } out.into() }, "models".to_string() => { let mut out = Object::default(); for v in txn.all_db_models(ns, db).await?.iter() { - out.insert(v.name.to_string(), v.to_string().into()); + out.insert(v.name.to_raw(), v.to_string().into()); } out.into() }, "params".to_string() => { let mut out = Object::default(); for v in txn.all_db_params(ns, db).await?.iter() { - out.insert(v.name.to_string(), v.to_string().into()); + out.insert(v.name.to_raw(), v.to_string().into()); } out.into() }, "tables".to_string() => { let mut out = Object::default(); for v in txn.all_tb(ns, db).await?.iter() { - out.insert(v.name.to_string(), v.to_string().into()); + out.insert(v.name.to_raw(), v.to_string().into()); } out.into() }, "users".to_string() => { let mut out = Object::default(); for v in txn.all_db_users(ns, db).await?.iter() { - out.insert(v.name.to_string(), v.to_string().into()); + out.insert(v.name.to_raw(), v.to_string().into()); } out.into() }, @@ -249,7 +249,7 @@ impl InfoStatement { "events".to_string() => { let mut out = Object::default(); for v in txn.all_tb_events(ns, db, tb).await?.iter() { - out.insert(v.name.to_string(), v.to_string().into()); + out.insert(v.name.to_raw(), v.to_string().into()); } out.into() }, @@ -263,21 +263,21 @@ impl InfoStatement { "indexes".to_string() => { let mut out = Object::default(); for v in txn.all_tb_indexes(ns, db, tb).await?.iter() { - out.insert(v.name.to_string(), v.to_string().into()); + out.insert(v.name.to_raw(), v.to_string().into()); } out.into() }, "lives".to_string() => { let mut out = Object::default(); for v in txn.all_tb_lives(ns, db, tb).await?.iter() { - out.insert(v.id.to_string(), v.to_string().into()); + out.insert(v.id.to_raw(), v.to_string().into()); } out.into() }, "tables".to_string() => { let mut out = Object::default(); for v in txn.all_tb_views(ns, db, tb).await?.iter() { - out.insert(v.name.to_string(), v.to_string().into()); + out.insert(v.name.to_raw(), v.to_string().into()); } out.into() },