aboutsummaryrefslogtreecommitdiffstats
path: root/bsfs/query
diff options
context:
space:
mode:
Diffstat (limited to 'bsfs/query')
-rw-r--r--bsfs/query/ast/filter_.py3
-rw-r--r--bsfs/query/matcher.py4
-rw-r--r--bsfs/query/validator.py4
3 files changed, 6 insertions, 5 deletions
diff --git a/bsfs/query/ast/filter_.py b/bsfs/query/ast/filter_.py
index 56c982e..610fdb4 100644
--- a/bsfs/query/ast/filter_.py
+++ b/bsfs/query/ast/filter_.py
@@ -10,7 +10,8 @@ For example, consider the following AST:
>>> Any(ns.bse.collection,
... And(
... Equals('hello'),
-... Any(ns.bsm.guid, Any(ns.bsm.guid, Equals('hello'))),
+... Is('hello world'),
+... Any(ns.bse.tag, Equals('world')),
... Any(ns.bst.label, Equals('world')),
... All(ns.bst.label, Not(Equals('world'))),
... )
diff --git a/bsfs/query/matcher.py b/bsfs/query/matcher.py
index 5f3b07e..17c9c8e 100644
--- a/bsfs/query/matcher.py
+++ b/bsfs/query/matcher.py
@@ -215,8 +215,8 @@ class Filter():
two following queries are semantically identical, but structurally different,
and would therefore not match:
- >>> ast.filter.OneOf(ast.filter.Predicate(ns.bse.filename))
- >>> ast.filter.Predicate(ns.bse.filename)
+ >>> ast.filter.OneOf(ast.filter.Predicate(ns.bse.name))
+ >>> ast.filter.Predicate(ns.bse.name)
"""
diff --git a/bsfs/query/validator.py b/bsfs/query/validator.py
index 1ce44e9..10ca492 100644
--- a/bsfs/query/validator.py
+++ b/bsfs/query/validator.py
@@ -177,7 +177,7 @@ class Filter():
if not type_ <= dom:
raise errors.ConsistencyError(f'expected type {dom}, found {type_}')
# node.count is a numerical expression
- self._parse_filter_expression(self.schema.literal(ns.bsfs.Number), node.count)
+ self._parse_filter_expression(self.schema.literal(ns.bsl.Number), node.count)
def _distance(self, type_: bsc.Vertex, node: ast.filter.Distance):
# type is a Literal
@@ -218,7 +218,7 @@ class Filter():
if type_ not in self.schema.literals():
raise errors.ConsistencyError(f'literal {type_} is not in the schema')
# type must be a numerical
- if not type_ <= self.schema.literal(ns.bsfs.Number):
+ if not type_ <= self.schema.literal(ns.bsl.Number):
raise errors.ConsistencyError(f'expected a number type, found {type_}')
# FIXME: Check if node.value corresponds to type_