Details
-
New Feature
-
Status: Closed (View Workflow)
-
P2
-
Resolution: Done
-
None
Description
To be implemented as a stand-alone tool with an API that can be, eventually, consumed in the raml-module-builder and/or particular modules. Possibly a command-line interface if it simplifies testing/demoing.
Unless there is a reason not to, the tool should live in it's own git repo.
In short, given a JSON Schema for a particular object/document and the CQL-query, the tool generates a matching SELECT or WHERE clause that can be executed on the JSONB column in Postgres containing the objects.
The tool should be structured in a way that the JSON Schema traversal (to look up JSON object's key path(s) and type(s)) and Postgres query translation is as independent as possible to open up possibilities for implementation of translators to other query languages (e.g SOLR).
In the first iteration a general structure of the boolean query (AND/OR/NOT) should be translated, search indices should be mapped to equivalent (same name) JSON fields, and the '=' relation opertor should be mapped to a substring match (_LIKE '%s%').
We will also want to have the most basic suppor for specifying sort order using the sortBy keyword (which should be translated into ORDER BY): sortBy fieldName.
Repo:
TestRail: Results
Attachments
Issue Links
- blocks
-
DMOD-80 Design proper query language
-
- Closed
-
-
DMOD-119 use CQL for searching/filtering records in mod-users
-
- Closed
-
-
DMOD-130 Use cql2pgjson-java for queries in RMB
-
- Closed
-
-
STRIPES-119 Use CQL for all protocol-level searching
-
- Closed
-
- is duplicated by
-
FOLIO-427 release CQL2PgJSON to the FOLIO maven repo
-
- Closed
-
- relates to
-
FOLIO-420 CQL2PgJSON: check index field name
-
- Closed
-
-
DMOD-143 CQL queries should match words, not substrings
-
- Closed
-