Commit ce074788 authored by Jérome Perrin's avatar Jérome Perrin

SQLCatalog: keep the order when building query from AST

When searching for something like for example "A AND B", make sure that
the AND complex query contains query for ["A", "B"], not ["B", "A"].
This is probably always equivalent in generated SQL, but this makes
testing easier.

Revealed by testSQLCatalog.TestSQLCatalog with PYTHONHASHSEED 279 on py2
parent 627af881
......@@ -14,6 +14,7 @@
##############################################################################
from __future__ import absolute_import
from collections import OrderedDict
import six
from six import string_types as basestring
from six.moves import xrange
......@@ -1928,7 +1929,7 @@ class Catalog(Folder,
)
else:
query_list = []
value_dict = {}
value_dict = OrderedDict()
append = query_list.append
for subnode in node.getNodeList():
if subnode.isLeaf():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment