-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,23 @@ | ||
WORK IN PROGRESS, NOT READY FOR USE | ||
# CQL2-RS | ||
|
||
Currently working: | ||
All CQL2-JSON and CQL2-TEXT examples from the ogcapi-features repo parse into json that succesfully validates against the cql2.json schema. | ||
## WORK IN PROGRESS, NOT READY FOR USE | ||
|
||
to test use cargo run and then at the prompt, you can enter either a json string for cql2-json or cql2-text | ||
Parse, validate, and convert CQL2-Text and CQL2-JSON. | ||
|
||
## CLI | ||
Both commands take either CQL2-Text or CQL2-JSON on stdin, as a quoted/escaped argument, or interactively. They will return status code 0 on successful validation or status code 1 if there was a problem parsing or validating. Verbosity of the validation errors can be controlled using the CQL2_DEBUG_LEVEL environment variable between 0 and 3. | ||
- cql2json - returns standardized CQL2-JSON | ||
- cql2text - returns standardized CQL2-Text | ||
|
||
## Response | ||
Response may not match the input. | ||
### CQL2-Text Differences | ||
- all identifiers in output are double quoted | ||
- 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 | ||
|
||
Tasks to get to ready-to-use state: | ||
- [x] Parse all examples from CQL2 examples into json that passes json schema validation. | ||
- [ ] Add tests that compare OGC examples to parsed/standardized/validated CQL2-Text and CQL2-JSON | ||
- [ ] Fix issues with Z, ZM, and M WKT variants |