1 Reply Latest reply on Oct 25, 2016 2:29 PM by Steven Hawkins

    How to manipulate Where clause (Condition) for query?

    Shekhar Mishra Newbie

      Hello,

      I wanted to add a virtual column for table to show data in JSON Format. Its a common feature required for connector workflow and ended up implementing it as Delegate translator. Where i added the new Column definition in delegate translator and able to form the required json string to form the response of a query. It works as expected.

       

      Now I am trying to support the condition on the virtual Column.

       

      Assume a new virtual column VC is constructed by concatenating  column A and B in JSON format.  If it receives a condition on VC , I want to translate the condition to Column A and B in delegate translator and  propagate it to real translator for processing.

       

      Is it possible to do that? Can I manipulate the Condition in delegate translator so that the underlying translator interpret it correctly.

      This delegate translator should work with various translator (JDBC, File etc)

       

      Another ask is to remove the Comparison from the Condition tree and have it evaluated by the delegate translator.

      Thanks

      Shekhar

        • 1. Re: How to manipulate Where clause (Condition) for query?
          Steven Hawkins Master

          > This delegate translator should work with various translator (JDBC, File etc)

           

          Generally our recommendation for a JSON data binding is to use OData.  In the case of doing this in a custom way as a delegating translator, it really matters what the condition is as to whether you can split it and then it matter what the source is as to whether the construct will be supported.  If at all possible the JSON binding should be done at a high level (such as being done with JSON functions in a view layer), so that the lower level processing doesn't require special handling.

           

          > Another ask is to remove the Comparison from the Condition tree and have it evaluated by the delegate translator.

           

          Here again, this sounds more like what the OData layer is providing - a general binding to JSON/XML.  You probably don't want to go down this path in your own layer.