Reference

Keywords

  1. Keywords for IoTDB (case insensitive):
  2. 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, WITH
  3. Keywords with special meanings (case sensitive):
  4. * Data Types: BOOLEAN, DOUBLE, FLOAT, INT32, INT64, TEXT (Only capitals is acceptable)
  5. * Encoding Methods: BITMAP, DFT, GORILLA, PLAIN, RLE, TS_2DIFF (Only capitals is acceptable)
  6. * Compression Methods: UNCOMPRESSED, SNAPPY (Only capitals is acceptable)
  7. * Logical symbol: AND, &, &&, OR, | , ||, NOT, !, TRUE, FALSE

Identifiers

  1. QUOTE := '\'';
  2. DOT := '.';
  3. COLON : ':' ;
  4. COMMA := ',' ;
  5. SEMICOLON := ';' ;
  6. LPAREN := '(' ;
  7. RPAREN := ')' ;
  8. LBRACKET := '[';
  9. RBRACKET := ']';
  10. EQUAL := '=' | '==';
  11. NOTEQUAL := '<>' | '!=';
  12. LESSTHANOREQUALTO := '<=';
  13. LESSTHAN := '<';
  14. GREATERTHANOREQUALTO := '>=';
  15. GREATERTHAN := '>';
  16. DIVIDE := '/';
  17. PLUS := '+';
  18. MINUS := '-';
  19. STAR := '*';
  20. Letter := 'a'..'z' | 'A'..'Z';
  21. HexDigit := 'a'..'f' | 'A'..'F';
  22. Digit := '0'..'9';
  23. Boolean := TRUE | FALSE | 0 | 1 (case insensitive)
  1. StringLiteral := ( '\'' ( ~('\'') )* '\'' | '\"' ( ~('\"') )* '\"');
  2. eg. abc
  3. eg. abc
  1. Integer := ('-' | '+')? Digit+;
  2. eg. 123
  3. eg. -222
  1. Float := ('-' | '+')? Digit+ DOT Digit+ (('e' | 'E') ('-' | '+')? Digit+)?;
  2. eg. 3.1415
  3. eg. 1.2E10
  4. eg. -1.33
  1. Identifier := (Letter | '_') (Letter | Digit | '_' | MINUS)*;
  2. eg. a123
  3. eg. _abc123

Literals

  1. PointValue : Integer | Float | StringLiteral | Boolean
  1. TimeValue : Integer | DateTime | ISO8601 | NOW()
  2. Note: Integer means timestamp type.
  3. DateTime :
  4. eg. 2016-11-16T16:22:33+08:00
  5. eg. 2016-11-16 16:22:33+08:00
  6. eg. 2016-11-16T16:22:33.000+08:00
  7. eg. 2016-11-16 16:22:33.000+08:00
  8. Note: DateTime Type can support several types, see Chapter 3 Datetime section for details.
  1. PrecedenceEqualOperator : EQUAL | NOTEQUAL | LESSTHANOREQUALTO | LESSTHAN | GREATERTHANOREQUALTO | GREATERTHAN
  1. Timeseries : ROOT [DOT <LayerName>]* DOT <SensorName>
  2. LayerName : Identifier
  3. SensorName : Identifier
  4. eg. root.ln.wf01.wt01.status
  5. eg. root.sgcc.wf03.wt01.temperature
  6. Note: Timeseries must be start with `root`(case insensitive) and end with sensor name.
  1. PrefixPath : ROOT (DOT <LayerName>)*
  2. LayerName : Identifier | STAR
  3. eg. root.sgcc
  4. eg. root.*
  1. Path: (ROOT | <LayerName>) (DOT <LayerName>)*
  2. LayerName: Identifier | STAR
  3. eg. root.ln.wf01.wt01.status
  4. eg. root.*.wf01.wt01.status
  5. eg. root.ln.wf01.wt01.*
  6. eg. *.wt01.*
  7. eg. *