Enable map access for numbers, multiple nesting levels (#356)

* enable integer keys for map access

* enable map access for number keys

* Add tests for string based map access

* MapAccess: unbox single quoted strings to always display double quoted strings for map access

* cargo fmt

* cargo clippy

* Fix compilation with nostd by avoiding format!

* fix codestyle

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
This commit is contained in:
Guillaume Balaine 2021-09-24 20:22:12 +02:00 committed by GitHub
parent 014b82f03d
commit d498887a5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 91 additions and 5 deletions

View file

@ -194,7 +194,7 @@ fn rename_table() {
#[test]
fn map_access() {
let rename = "SELECT a.b[\"asdf\"] FROM db.table WHERE a = 2";
let rename = r#"SELECT a.b["asdf"] FROM db.table WHERE a = 2"#;
hive().verified_stmt(rename);
}