CaosDB Query Language Syntax
This is the documentation of the CaosDB Query Language Syntax. The authoritative specification of the syntax is the ANTLR4 grammar you can find in the source code: CQLParser.g4 and CQLLexer.g4
See examples in Query Language.
- parser grammar CQLParser
- rule cq
This is the root of the CQL grammar.
- rule version
For versioned queries.
- rule prop_sel
The comma-separated list of selected (sub)properties of a SELECT query.
- rule prop_subsel
The (sub-)selections (e.g. geolocation.longitude) of a SELECT query.
- rule selector_txt
Rule for the allowed characters of a prop_subsel.
- rule role
The entity role.
- rule entity_filter
The filters of a FIND, SELECT, or COUNT query.
- rule which_exp
WHICH keyword and syntactic sugar.
- rule filter_expression
Collection of different filters.
- rule idfilter
ID Filter (e.g. id > 10123).
- rule transaction
Transaction filter (e.g INSERTED BY ME).
- rule transactor
The transactor (e.g. “user1”, or “ME”).
- rule username
A user name or a user name pattern.
- rule transaction_time
Time or timeframe of a transaction (for the transaction filter).
- rule datetime
A date time or a fragment of a date time.
Not fully compliant with iso 8601 (TODO).
- rule pov
The property-operator-value filter (e.g. temperator > 240°C) and (optionally) subfilters.
- rule subproperty
Wrapper for a filter on referenced entities.
- rule subproperty_filter
The actual filter on referenced entities.
- rule backreference
The backreference filter (e.g. REFERENCED BY …).
- rule storedat
Stored-at filter for the path of files.
- rule conjunction
Combine other filters with a logical AND.
- rule disjunction
Combine other filter with a logical OR.
- rule negation
Negation of another filter.
- rule entity
An entity’s full name, id, or a pattern for a name.
- rule regexp_pattern
A regexp pattern.
- rule property
A Property’s name, id or a pattern of a name.
- rule minmax
Expression for minumum or maximum.
- rule value
A property value.
- rule number_with_unit
A number with a unit (e.g. 20m).
- rule unit
A unit from a physical system of units or any other kind of system.
- rule location
A files path.
- rule atom
An atomic string or pattern.
- rule single_quoted
A single-quoted string or pattern.
- rule double_quoted
A double-quoted string or pattern.