Skip to content

Commit

Permalink
couple more test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Sep 26, 2024
1 parent 48e40ba commit 53804b0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/it/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,24 @@ async fn server_side_param() {
.await
.expect("failed to fetch string");
assert_eq!(result, "string");

let result = client
.query("SELECT {val1: String} AS result")
.with_param("val1", "\x01\x02\x03\\\"\'")
.expect("failed to bind \"string\"")
.fetch_one::<String>()
.await
.expect("failed to fetch string");
assert_eq!(result, "\x01\x02\x03\\\"\'");

let result = client
.query("SELECT {val1: Array(String)} AS result")
.with_param("val1", vec!["a", "bc"])
.expect("failed to bind \"string\"")
.fetch_one::<Vec<String>>()
.await
.expect("failed to fetch string");
assert_eq!(result, &["a", "bc"]);
}

// See #19.
Expand Down

0 comments on commit 53804b0

Please sign in to comment.