Skip to content
Snippets Groups Projects
Commit d7ba14fa authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

Merge branch 'f-query-property-existence-by-name' into 'dev'

CQL now treats 'WITH` and `WITH A` equivalently. For #192.

See merge request !83
parents 455ac7a2 94481620
No related branches found
No related tags found
2 merge requests!96DOC: Added CITATION.cff to the list of files in the release guide where the...,!83CQL now treats 'WITH` and `WITH A` equivalently. For #192.
Pipeline #34416 failed
......@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ###
- CQL now treats `WITH` and `WITH A` equivalently. This is for [#192](https://gitlab.com/caosdb/caosdb-server/-/issues/192).
### Deprecated ###
### Removed ###
......
......@@ -219,6 +219,12 @@ The following query returns entities which have a _pname1_ property with any val
`FIND ename WITH pname1`
`FIND ename WITH A pname1`
`FIND ename WITH A PROPERTY pname1`
`FIND ename WITH PROPERTY pname1`
`FIND ename . pname1`
`FIND ename.pname1`
......@@ -338,7 +344,7 @@ Any result set can be filtered by logically combining POV filters or back refere
* NOT:: The logical negation. Equivalent expressions: `NOT, DOESN'T HAVE A PROPERTY, DOES NOT HAVE A PROPERTY, DOESN'T HAVE A, DOES NOT HAVE A, DOES NOT, DOESN'T, IS NOT, ISN'T, !`
* OR:: The logical _or_. Equivalent expressions: `OR, |`
* RECORD,RECORDTYPE,FILE,PROPERTY:: Role expression for restricting the result set to a specific role.
* WHICH:: The marker for the beginning of the filters. Equivalent expressions: `WHICH, WHICH HAS A, WHICH HAS A PROPERTY, WHERE, WITH, .`
* WHICH:: The marker for the beginning of the filters. Equivalent expressions: `WHICH, WHICH HAS A, WHICH HAS A PROPERTY, WHERE, WITH (A), .`
* REFERENCE:: This one is tricky: `REFERENCE TO` expresses a the state of _having_ a reference property. `REFERENCED BY` expresses the state of _being_ referenced by another entity.
* COUNT:: `COUNT` works like `FIND` but doesn't return the entities.
......
......@@ -277,10 +277,6 @@ NEGATION:
) WHITE_SPACE_f?
;
WITH:
[Ww][Ii][Tt][Hh] WHITE_SPACE_f?
;
THE:
[Tt][Hh][Ee] WHITE_SPACE_f?
;
......@@ -309,6 +305,10 @@ ELSE:
[Ee][Ll][Ss][Ee] WHITE_SPACE_f?
;
WITH_A:
[Ww][Ii][Tt][Hh] (WHITE_SPACE_f? A)? WHITE_SPACE_f?
;
WHERE:
[Ww][Hh][Ee][Rr][Ee] WHITE_SPACE_f?
;
......
......@@ -129,7 +129,7 @@ entity_filter returns [EntityFilterInterface filter]
which_exp:
WHICH (HAS_A (PROPERTY)?)?
| HAS_A (PROPERTY)?
| WITH (A (PROPERTY)?)?
| WITH_A (PROPERTY)?
| WHERE
| DOT WHITE_SPACE?
;
......@@ -527,7 +527,7 @@ number_with_unit
unit
:
(~(WHITE_SPACE | WHICH | HAS_A | WITH | WHERE | DOT | AND | OR | RPAREN ))
(~(WHITE_SPACE | WHICH | HAS_A | WITH_A | WHERE | DOT | AND | OR | RPAREN ))
(~(WHITE_SPACE))*
|
NUM SLASH (~(WHITE_SPACE))+
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment