X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_ro%2Fdb_base.py;h=1d8ee651550618ccba4a6a4449eeef71d53b7dfa;hb=1c848c01d41949c0498a342c38327b8e9dae03bd;hp=5bdd02ad4d5495e8cb45428342f70f0573309a21;hpb=3fcfdb7674436861d6ab0740972573293b9a355f;p=osm%2FRO.git diff --git a/osm_ro/db_base.py b/osm_ro/db_base.py index 5bdd02ad..1d8ee651 100644 --- a/osm_ro/db_base.py +++ b/osm_ro/db_base.py @@ -297,7 +297,7 @@ class db_base(): If a dict it will generate 'key1="value1" AND key2="value2" AND ...'. If value is None, it will produce 'key is null' If value is a list or tuple, it will produce 'key="value[0]" OR key="value[1]" OR ...' - keys can be suffixed by >,<,<>,>=,<= so that this is used to compare key and value instead of "=" + keys can be suffixed by >,<,<>,>=,<=,' LIKE ' so that this is used to compare key and value instead of "=" The special keys "OR", "AND" with a dict value is used to create a nested WHERE If a list, each item will be a dictionary that will be concatenated with OR by default :param data: dict or list of dicts @@ -314,7 +314,7 @@ class db_base(): cmd.append("(" + self.__create_where(v, use_or=False) + ")") continue - if k.endswith(">") or k.endswith("<") or k.endswith("="): + if k.endswith(">") or k.endswith("<") or k.endswith("=") or k.endswith(" LIKE "): pass else: k += "="