Rule | Guidelines | Examples |
---|---|---|
Case-Sensitivity | Identifiers are always case-sensitive | * DOCUMENTNAME * DocumentName * documentname |
Non-Quoted Identifiers | Must start with a letter (A-Z or a-z) or an underscore Can contain only letters, digits, and underscores INVALID: Cannot use reserved keywords; for example: * 1abc * ab$c | * abc_4u * _abc * abc123 |
Quoted Identifiers | Quote identifiers using backticks (“) Usage of double quotes ("") is deprecated Use any UTF-8 character Can be escaped inside existing delimiters | * `1abc` * `ab$c` * `a b` * `a b`.c * `a “b“ c` |
Element | Rule |
---|---|
Document Identifier | _id is a reserved identifier for the document ID. All documents must have an assigned document ID. |
System Collection Identifiers | Double underscore (__ ) is a reserved identifier prefix for collections. Double underscore denotes a Ditto system collection. |
.
).
For example, to navigate to the seats
field in a SELECT
statement:
DQL_STRICT_MODE=false
, collection definitions are no longer required.Read moreTopic | Guidelines |
---|---|
Path Evaluation | Path expressions are evaluated from left to right. For example, a.b.c :* a is the leftmost name* b is an intermediate name* c is the rightmost name |
Collections | Collection names cannot be present in path expressions. |
Types | Only REGISTER with nested JSON object and MAP types can be navigated with path expressions. |
MISSING | The path expression result is MISSING for the following conditions are both true:* The leftmost name and all intermediate names are a REGISTER with JSON object type or a MAP type.* The last name in the path does not exist. |
string
literals in single quotes (''
) in DQL; for example 'blue'
:
""
) cannot be not used to represent string
literals within DQL.--
operator.
/*
and */
operator.