Reference
Keywords
Keywords for IoTDB (case insensitive):ADD, BY, COMPRESSOR, CREATE, DATATYPE, DELETE, DESCRIBE, DROP, ENCODING, EXIT, FROM, GRANT, GROUP, LABLE, LINK, INDEX, INSERT, INTO, LOAD, MAX_POINT_NUMBER, MERGE, METADATA, ON, ORDER, PASSWORD, PRIVILEGES, PROPERTY, QUIT, REVOKE, ROLE, ROOT, SELECT, SET, SHOW, STORAGE, TIME, TIMESERIES, TIMESTAMP, TO, UNLINK, UPDATE, USER, USING, VALUE, VALUES, WHERE, WITHKeywords with special meanings (case sensitive):* Data Types: BOOLEAN, DOUBLE, FLOAT, INT32, INT64, TEXT (Only capitals is acceptable)* Encoding Methods: BITMAP, DFT, GORILLA, PLAIN, RLE, TS_2DIFF (Only capitals is acceptable)* Compression Methods: UNCOMPRESSED, SNAPPY (Only capitals is acceptable)* Logical symbol: AND, &, &&, OR, | , ||, NOT, !, TRUE, FALSE
Identifiers
QUOTE := '\'';DOT := '.';COLON : ':' ;COMMA := ',' ;SEMICOLON := ';' ;LPAREN := '(' ;RPAREN := ')' ;LBRACKET := '[';RBRACKET := ']';EQUAL := '=' | '==';NOTEQUAL := '<>' | '!=';LESSTHANOREQUALTO := '<=';LESSTHAN := '<';GREATERTHANOREQUALTO := '>=';GREATERTHAN := '>';DIVIDE := '/';PLUS := '+';MINUS := '-';STAR := '*';Letter := 'a'..'z' | 'A'..'Z';HexDigit := 'a'..'f' | 'A'..'F';Digit := '0'..'9';Boolean := TRUE | FALSE | 0 | 1 (case insensitive)
StringLiteral := ( '\'' ( ~('\'') )* '\'' | '\"' ( ~('\"') )* '\"');eg. ‘abc’eg. “abc”
Integer := ('-' | '+')? Digit+;eg. 123eg. -222
Float := ('-' | '+')? Digit+ DOT Digit+ (('e' | 'E') ('-' | '+')? Digit+)?;eg. 3.1415eg. 1.2E10eg. -1.33
Identifier := (Letter | '_') (Letter | Digit | '_' | MINUS)*;eg. a123eg. _abc123
Literals
PointValue : Integer | Float | StringLiteral | Boolean
TimeValue : Integer | DateTime | ISO8601 | NOW()Note: Integer means timestamp type.DateTime : eg. 2016-11-16T16:22:33+08:00eg. 2016-11-16 16:22:33+08:00eg. 2016-11-16T16:22:33.000+08:00eg. 2016-11-16 16:22:33.000+08:00Note: DateTime Type can support several types, see Chapter 3 Datetime section for details.
PrecedenceEqualOperator : EQUAL | NOTEQUAL | LESSTHANOREQUALTO | LESSTHAN | GREATERTHANOREQUALTO | GREATERTHAN
Timeseries : ROOT [DOT <LayerName>]* DOT <SensorName>LayerName : IdentifierSensorName : Identifiereg. root.ln.wf01.wt01.statuseg. root.sgcc.wf03.wt01.temperatureNote: Timeseries must be start with `root`(case insensitive) and end with sensor name.
PrefixPath : ROOT (DOT <LayerName>)*LayerName : Identifier | STAReg. root.sgcceg. root.*
Path: (ROOT | <LayerName>) (DOT <LayerName>)* LayerName: Identifier | STAReg. root.ln.wf01.wt01.statuseg. root.*.wf01.wt01.statuseg. root.ln.wf01.wt01.*eg. *.wt01.*eg. *