taosdef.h 2.0 KB
Newer Older
H
hzcheng 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/*
 * Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
 *
 * This program is free software: you can use, redistribute, and/or modify
 * it under the terms of the GNU Affero General Public License, version 3
 * or later ("AGPL"), as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

S
Shengliang Guan 已提交
16 17
#ifndef _TD_COMMON_TAOS_DEF_H
#define _TD_COMMON_TAOS_DEF_H
H
hzcheng 已提交
18 19 20 21 22

#ifdef __cplusplus
extern "C" {
#endif

S
Shengliang Guan 已提交
23
#include "tdef.h"
H
hzcheng 已提交
24
#include "taos.h"
H
hzcheng 已提交
25

26
#define TSWINDOW_INITIALIZER ((STimeWindow) {INT64_MIN, INT64_MAX})
D
fix bug  
dapan1121 已提交
27
#define TSWINDOW_DESC_INITIALIZER ((STimeWindow) {INT64_MAX, INT64_MIN})
W
wpan 已提交
28
#define IS_TSWINDOW_SPECIFIED(win) (((win).skey != INT64_MIN) || ((win).ekey != INT64_MAX))
D
fix bug  
dapan1121 已提交
29

S
TD-1915  
Shengliang Guan 已提交
30 31 32 33 34 35 36
typedef enum {
  TAOS_QTYPE_RPC   = 0,
  TAOS_QTYPE_FWD   = 1,
  TAOS_QTYPE_WAL   = 2,
  TAOS_QTYPE_CQ    = 3,
  TAOS_QTYPE_QUERY = 4
} EQType;
J
jtao1735 已提交
37

S
[TD-10]  
slguan 已提交
38
typedef enum {
S
TD-1915  
Shengliang Guan 已提交
39 40
  TSDB_SUPER_TABLE  = 0,   // super table
  TSDB_CHILD_TABLE  = 1,   // table created from super table
H
Haojun Liao 已提交
41 42 43 44
  TSDB_NORMAL_TABLE = 2,   // ordinary table
  TSDB_STREAM_TABLE = 3,   // table created from stream computing
  TSDB_TEMP_TABLE   = 4,   // temp table created by nest query
  TSDB_TABLE_MAX    = 5
S
slguan 已提交
45 46 47
} ETableType;

typedef enum {
S
TD-1915  
Shengliang Guan 已提交
48 49 50 51 52
  TSDB_MOD_MNODE   = 0,
  TSDB_MOD_HTTP    = 1,
  TSDB_MOD_MONITOR = 2,
  TSDB_MOD_MQTT    = 3,
  TSDB_MOD_MAX     = 4
S
slguan 已提交
53
} EModuleType;
S
[TD-10]  
slguan 已提交
54

S
TD-1915  
Shengliang Guan 已提交
55 56 57 58 59
typedef enum {
  TSDB_CHECK_ITEM_NETWORK,
  TSDB_CHECK_ITEM_MEM,
  TSDB_CHECK_ITEM_CPU,
  TSDB_CHECK_ITEM_DISK,
H
Haojun Liao 已提交
60 61
  TSDB_CHECK_ITEM_OS,
  TSDB_CHECK_ITEM_ACCESS,
S
TD-1915  
Shengliang Guan 已提交
62 63 64 65
  TSDB_CHECK_ITEM_VERSION,
  TSDB_CHECK_ITEM_DATAFILE,
  TSDB_CHECK_ITEM_MAX
} ECheckItemType;
H
Hui Li 已提交
66

67 68 69 70 71 72
typedef enum {
  TD_ROW_DISCARD_UPDATE   = 0,
  TD_ROW_OVERWRITE_UPDATE = 1,
  TD_ROW_PARTIAL_UPDATE   = 2
} TDUpdateConfig;

S
Shengliang Guan 已提交
73
extern char *qtypeStr[];
H
Hui Li 已提交
74

H
hzcheng 已提交
75 76 77 78
#ifdef __cplusplus
}
#endif

S
Shengliang Guan 已提交
79
#endif /*_TD_COMMON_TAOS_DEF_H*/