cql2

Crates.iocql2
lib.rscql2
version0.3.0
sourcesrc
created_at2024-10-08 10:27:51.398175
updated_at2024-10-14 14:19:55.978293
descriptionParse, validate, and convert Common Query Language (CQL2) text and JSON
homepagehttps://github.com/developmentseed/cql2-rs
repositoryhttps://github.com/developmentseed/cql2-rs
max_upload_size
id1400999
size256,262
Pete Gadomski (gadomski)

documentation

https://docs.rs/cql2

README

cql2-rs

CI

Parse, validate, and convert Common Query Language (CQL2) text and JSON.

Usage

API

[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.

CLI

See the cql2-cli README for details.

Responses

Responses may not match the input.

cql2-text differences

  • 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

Development

See CONTRIBUTING.md for information about contributing to this project.

License

cql2-rs is licensed under the MIT license. See LICENSE for details.

Commit count: 101

cargo fmt