Skip to content

Commit

Permalink
Assertion should consider case-insensitive keywords (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
rcastill authored Dec 27, 2020
1 parent 614316a commit 7931c89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion influxdb/src/integrations/serde_integration/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ impl Client {
})?;

let read_query = query.get();
let read_query_lower = read_query.to_lowercase();

if !read_query.contains("SELECT") && !read_query.contains("SHOW") {
if !read_query_lower.contains("select") && !read_query_lower.contains("show") {
let error = Error::InvalidQueryError {
error: String::from(
"Only SELECT and SHOW queries supported with JSON deserialization",
Expand Down

0 comments on commit 7931c89

Please sign in to comment.