Fix decimal deserialisation (#2687)
This commit is contained in:
parent
5446666e7d
commit
3c48558ca2
2 changed files with 13 additions and 1 deletions
|
@ -96,7 +96,7 @@ reqwest = { version = "0.11.18", default-features = false, features = ["json", "
|
|||
revision = "0.5.0"
|
||||
roaring = { version = "0.10.2", features = ["serde"] }
|
||||
rocksdb = { version = "0.21.0", optional = true }
|
||||
rust_decimal = { version = "1.31.0", features = ["maths"] }
|
||||
rust_decimal = { version = "1.31.0", features = ["maths", "serde-str"] }
|
||||
rust-stemmers = "1.2.0"
|
||||
rustls = { version = "0.20.8", optional = true }
|
||||
scrypt = "0.11.0"
|
||||
|
|
|
@ -191,6 +191,18 @@ async fn query() {
|
|||
assert_eq!(name, "John Doe");
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn query_decimals() {
|
||||
let db = new_db().await;
|
||||
db.use_ns(NS).use_db(Ulid::new().to_string()).await.unwrap();
|
||||
let sql = "
|
||||
DEFINE TABLE foo;
|
||||
DEFINE FIELD bar ON foo TYPE decimal;
|
||||
CREATE foo CONTENT { bar: 42.69 };
|
||||
";
|
||||
let _ = db.query(sql).await.unwrap().check().unwrap();
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn query_binds() {
|
||||
let db = new_db().await;
|
||||
|
|
Loading…
Reference in a new issue