Skip to content
Snippets Groups Projects
Commit 972f9e0c authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

DOC: heading level

parent 29eefbba
No related branches found
No related tags found
No related merge requests found
**Table of Contents** # CaosDB Query Language
[[_TOC_]] **WIP This is going to be the specification. CQL tutorials are in the webui**
# Example queries ## Example queries
## Simple FIND Query ### Simple FIND Query
The following query will return any entity which has the name _ename_ and all its children. The following query will return any entity which has the name _ename_ and all its children.
`FIND ename` `FIND ename`
...@@ -24,11 +24,11 @@ Regular expressions must be surrounded by _<<_ and '>>': ...@@ -24,11 +24,11 @@ Regular expressions must be surrounded by _<<_ and '>>':
`FIND RECORD <<[cC]am_[0-9]*>>` `FIND RECORD <<[cC]am_[0-9]*>>`
*TODO* (Timm): *TODO* (Timm):
Describe escape sequences like `\\`, `\*`, `\<<` and `\>>`. Describe escape sequences like `\\ `, `\*`, `\<<` and `\>>`.
Currently, wildcards and regular expressions are only available for the _simple-find-part_ of the query, i. e. no wildcards/regexps for filters. Currently, wildcards and regular expressions are only available for the _simple-find-part_ of the query, i. e. no wildcards/regexps for filters.
## Simple COUNT Query ### Simple COUNT Query
This query counts entities which have certain properties. This query counts entities which have certain properties.
...@@ -370,7 +370,7 @@ Since Caosdb 0.2 entities are optionally version controlled. The query language ...@@ -370,7 +370,7 @@ Since Caosdb 0.2 entities are optionally version controlled. The query language
* Add `(ANY|LATEST|LAST|OLDEST|NEWEST|FIRST) VERSION (BEFORE|AFTER) (<timestamp>|<transaction id>|<entity@version>) OF` modifier. * Add `(ANY|LATEST|LAST|OLDEST|NEWEST|FIRST) VERSION (BEFORE|AFTER) (<timestamp>|<transaction id>|<entity@version>) OF` modifier.
* Add support for subproperties, e.g. `FIND ANY VERSION OF ENTITY WHICH IS REFERENCED BY ename WITH ...`. * Add support for subproperties, e.g. `FIND ANY VERSION OF ENTITY WHICH IS REFERENCED BY ename WITH ...`.
# Future ## Future
* *Sub Queries* (or *Sub Properties*): `FIND ename WHICH HAS A pname WHICH HAS A subpname=val`. This is like: `FIND AN experiment WHICH HAS A camera WHICH HAS A 'serial number'= 1234567890` * *Sub Queries* (or *Sub Properties*): `FIND ename WHICH HAS A pname WHICH HAS A subpname=val`. This is like: `FIND AN experiment WHICH HAS A camera WHICH HAS A 'serial number'= 1234567890`
* *More Logic*, especially `ANY`, `ALL`, `NONE`, and `SUCH THAT` key words (and equivalents) for logical quantisation: `FIND ename1 SUCH THAT ALL ename2 WHICH HAVE A REFERENCE TO ename1 HAVE A pname=val`. This is like `FIND experiment SUCH THAT ALL person WHICH ARE REFERENCED BY THIS experiment AS conductor HAVE AN 'academic title'=professor.` * *More Logic*, especially `ANY`, `ALL`, `NONE`, and `SUCH THAT` key words (and equivalents) for logical quantisation: `FIND ename1 SUCH THAT ALL ename2 WHICH HAVE A REFERENCE TO ename1 HAVE A pname=val`. This is like `FIND experiment SUCH THAT ALL person WHICH ARE REFERENCED BY THIS experiment AS conductor HAVE AN 'academic title'=professor.`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment