fix: remove sqlformat (#3545)

* removed sqlformat from sql-core/src/logger.rs causing ref error to FormatOptions

* removed sqlformat from sql-core/src/logger.rs causing ref error to FormatOptions

---------

Co-authored-by: tbarnes <tbarnes@tbserver.tbarnes-server.local>
This commit is contained in:
Trevor 2024-10-04 21:34:18 -07:00 committed by GitHub
parent 19f40d87a6
commit cadf152e99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 16 additions and 32 deletions

19
Cargo.lock generated
View file

@ -1995,6 +1995,7 @@ version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149"
dependencies = [
"bindgen",
"cc",
"pkg-config",
"vcpkg",
@ -3306,17 +3307,6 @@ dependencies = [
"der",
]
[[package]]
name = "sqlformat"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c"
dependencies = [
"itertools 0.12.1",
"nom",
"unicode_categories",
]
[[package]]
name = "sqlx"
version = "0.8.2"
@ -3409,7 +3399,6 @@ dependencies = [
"serde_json",
"sha2",
"smallvec",
"sqlformat",
"sqlx",
"thiserror",
"time",
@ -4140,12 +4129,6 @@ version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d"
[[package]]
name = "unicode_categories"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e"
[[package]]
name = "untrusted"
version = "0.9.0"

View file

@ -69,7 +69,7 @@ regex = { version = "1.5.5", optional = true }
serde = { version = "1.0.132", features = ["derive", "rc"], optional = true }
serde_json = { version = "1.0.73", features = ["raw_value"], optional = true }
sha2 = { version = "0.10.0", default-features = false, optional = true }
sqlformat = "0.2.0"
#sqlformat = "0.2.0"
thiserror = "1.0.30"
tokio-stream = { version = "0.1.8", features = ["fs"], optional = true }
tracing = { version = "0.1.37", features = ["log"] }

View file

@ -60,8 +60,6 @@ pub(crate) fn private_level_filter_to_trace_level(
private_level_filter_to_levels(filter).map(|(level, _)| level)
}
pub use sqlformat;
pub struct QueryLogger<'q> {
sql: &'q str,
rows_returned: u64,
@ -112,11 +110,12 @@ impl<'q> QueryLogger<'q> {
summary.push_str("");
format!(
"\n\n{}\n",
sqlformat::format(
self.sql,
&sqlformat::QueryParams::None,
sqlformat::FormatOptions::default()
)
self.sql /*
sqlformat::format(
self.sql,
&sqlformat::QueryParams::None,
sqlformat::FormatOptions::default()
)*/
)
} else {
String::new()

View file

@ -416,11 +416,13 @@ impl<'q, R: Debug, S: Debug + DebugDiff, P: Debug> QueryPlanLogger<'q, R, S, P>
summary.push_str("");
format!(
"\n\n{}\n",
sqlformat::format(
self.sql,
&sqlformat::QueryParams::None,
sqlformat::FormatOptions::default()
)
self.sql /*
sqlformat::format(
self.sql,
&sqlformat::QueryParams::None,
sqlformat::FormatOptions::default()
)
*/
)
} else {
String::new()

View file

@ -128,7 +128,7 @@ pub fn dupe_value<T>(_t: &T) -> T {
#[test]
fn test_dupe_value() {
let ref val = (String::new(),);
let val = &(String::new(),);
if false {
let _: i32 = dupe_value(&0i32);