Uploaded image for project: 'FOLIO'
  1. FOLIO
  2. FOLIO-405

implement CQL-to-Postgres/JSONB translator

    XMLWordPrintable

Details

    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:

      https://github.com/julianladisch/cql2pgjson-java

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                julianladisch Julian Ladisch
                jakub Jakub Skoczen
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 1 hour
                    1h

                    TestRail: Runs

                      TestRail: Cases