diff --git a/CHANGELOG.md b/CHANGELOG.md index b9afaa0..345e2c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +## [0.5.0] - 2022-06-09 + +### Added + +- Print empty strings as "(empty)" + ## [0.4.0] - 2022-06-07 ### Added diff --git a/Cargo.toml b/Cargo.toml index 784de2d..6a944f1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sqllogictest" -version = "0.4.0" +version = "0.5.0" edition = "2021" description = "Sqllogictest parser and runner." license = "MIT OR Apache-2.0" diff --git a/src/main.rs b/src/main.rs index cea0c46..81d339c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -370,7 +370,13 @@ impl sqllogictest::AsyncDB for Postgres { write!(output, " ").unwrap(); } match row.get(i) { - Some(v) => write!(output, "{}", v).unwrap(), + Some(v) => { + if v.is_empty() { + write!(output, "(empty)").unwrap() + } else { + write!(output, "{}", v).unwrap() + } + } None => write!(output, "NULL").unwrap(), } }