Parse, validate, and convert Common Query Language (CQL2) text and JSON.
[dependencies]
cql = "0.3"
Then:
use cql2::Expr;
let expr: Expr = "landsat:scene_id = 'LC82030282019133LGN00'".parse().unwrap();
assert!(expr.is_valid());
println!("{}", expr.to_json().unwrap());
See the documentation for more.
See the cql2-cli README for details.
Responses may not match the input.
- All identifiers in output are double quoted
- The position of "NOT" keywords is standardized to be before the expression (ie "... NOT LIKE ..." will become "NOT ... LIKE ..."
- The negative operator on anything besides a literal number becomes "* -1"
- Parentheses are added around all expressions
See CONTRIBUTING.md for information about contributing to this project.
cql2-rs is licensed under the MIT license. See LICENSE for details.