예제 #1
0
 def test_sql_columns_operator(self):
     """
     Build the column part of index, with operator
     """
     jstr = '{"foo": "bar", "columns": [{"foobar": "gist_trgm_ops"}]}'
     idx = json.loads(jstr)
     res = "(foobar gist_trgm_ops)"
     self.assertEqual(util.sql_columns(idx), res)
예제 #2
0
 def test_sql_columns(self):
     """
     Build the column part of index
     """
     idx = {'foo': 'bar',
            'columns': ['foobar', 'id']}
     res = "(foobar,id)"
     self.assertEqual(util.sql_columns(idx), res)