Commit 0a8a2665 authored by Vincent Pelletier's avatar Vincent Pelletier

Products.ZSQLCatalog: Expose query base class to restricted Python

For type checking (not recommended, but sometimes useful).
Expose it as BaseQuery, to avoid conflict with AutoQuery original name.
parent d35b95ef
No related merge requests found
......@@ -2211,7 +2211,7 @@ class Catalog(Folder,
# as "RawKey"
elif search_key_name == 'ExactMatch':
search_key_name = value['key'] = 'RawKey'
if isinstance(value, _Query):
if isinstance(value, BaseQuery):
# Query instance: use as such, ignore key.
result = value
elif script is not None:
......@@ -2720,7 +2720,7 @@ InitializeClass(Catalog)
class CatalogError(Exception): pass
from Query.Query import Query as _Query
from Query.Query import Query as BaseQuery
from Query.SimpleQuery import SimpleQuery
from Query.ComplexQuery import ComplexQuery
from Query.AutoQuery import AutoQuery
......
......@@ -38,7 +38,7 @@ def initialize(context):
from AccessControl import ModuleSecurityInfo, ClassSecurityInfo
ModuleSecurityInfo('Products.ZSQLCatalog.SQLCatalog').declarePublic(
'ComplexQuery', 'Query', 'NegatedQuery', 'AndQuery', 'OrQuery',
'SQLQuery')
'BaseQuery', 'SQLQuery')
from Query import Query, SimpleQuery
from SearchKey import SearchKey
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