Example #1
0
 def test_unknown_subquery_key(self):
     wrong_nested_query = {
         '$filter': {
             'table': 'BarTable'
         },
         'wrong_key': 'baz'
     }
     with pytest.raises(ParsingInputError):
         select2sql(table='FooTable',
                    where={'something in': wrong_nested_query})
    def construct_select_query(filter_definition):
        """Return SELECT statement that will be used as a filter.

        :param filter_definition: definition of a filter that should be used
        for SELECT construction
        :return:
        """
        return select2sql(filter_definition)