jt2594838 commented on a change in pull request #450: modify documents URL: https://github.com/apache/incubator-iotdb/pull/450#discussion_r337348684
########## File path: docs/Documentation/UserGuide/4-Operation Manual/7-IoTDB Query Statement.md ########## @@ -0,0 +1,694 @@ +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +# Chapter 4 Operation Manual +# IoTDB SQL Statement +In this part, we will introduce you IoTDB's Query Language. IoTDB offers you a SQL-like query language for interacting with IoTDB, the query language can be devided into 4 major parts: + +* Schema Statement: statements about schema management are all listed in this section. +* Data Management Statement: statements about data management (such as: data insertion, data query, etc.) are all listed in this section. +* Database Management Statement: statements about database management and authentication are all listed in this section. +* Functions: functions that IoTDB offers are all listed in this section. + +All of these statements are write in IoTDB's own syntax, for details about the syntax composition, please check the `Reference` section. + +## IoTDB Query Statement + + +### Schema Statement + +* Set Storage Group + +``` SQL +SET STORAGE GROUP TO <PrefixPath> +Eg: IoTDB > SET STORAGE GROUP TO root.ln.wf01.wt01 +Note: PrefixPath can not include `*` +``` +* Create Timeseries Statement + +``` +CREATE TIMESERIES <Timeseries> WITH <AttributeClauses> +AttributeClauses : DATATYPE=<DataTypeValue> COMMA ENCODING=<EncodingValue> [COMMA <ExtraAttributeClause>]* +DataTypeValue: BOOLEAN | DOUBLE | FLOAT | INT32 | INT64 | TEXT +EncodingValue: GORILLA | PLAIN | RLE | TS_2DIFF | REGULAR +ExtraAttributeClause: { + COMPRESSOR = <CompressorValue> + MAX_POINT_NUMBER = Integer +} +CompressorValue: UNCOMPRESSED | SNAPPY Review comment: Please update the compressor types. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services