-
Notifications
You must be signed in to change notification settings - Fork 5k
Expand file tree
/
Copy pathsystable.h
More file actions
137 lines (125 loc) · 6.07 KB
/
systable.h
File metadata and controls
137 lines (125 loc) · 6.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
/*
* 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/>.
*/
#ifndef TDENGINE_SYSTABLE_H
#define TDENGINE_SYSTABLE_H
#ifdef __cplusplus
extern "C" {
#endif
#include "os.h"
#define TSDB_INFORMATION_SCHEMA_DB "information_schema"
#define TSDB_INS_TABLE_DNODES "ins_dnodes"
#define TSDB_INS_TABLE_MNODES "ins_mnodes"
#define TSDB_INS_TABLE_MODULES "ins_modules"
#define TSDB_INS_TABLE_QNODES "ins_qnodes"
#define TSDB_INS_TABLE_BACKUP_NODES "ins_backup_nodes" // no longer used
#define TSDB_INS_TABLE_SNODES "ins_snodes"
#define TSDB_INS_TABLE_ANODES "ins_anodes"
#define TSDB_INS_TABLE_ANODES_FULL "ins_anodes_full"
#define TSDB_INS_TABLE_XNODES "ins_xnodes"
#define TSDB_INS_TABLE_XNODE_TASKS "ins_xnode_tasks"
#define TSDB_INS_TABLE_XNODE_AGENTS "ins_xnode_agents"
#define TSDB_INS_TABLE_XNODE_JOBS "ins_xnode_jobs"
#define TSDB_INS_TABLE_XNODES_FULL "ins_xnodes_full"
#define TSDB_INS_TABLE_BNODES "ins_bnodes"
#define TSDB_INS_TABLE_ARBGROUPS "ins_arbgroups"
#define TSDB_INS_TABLE_CLUSTER "ins_cluster"
#define TSDB_INS_TABLE_DATABASES "ins_databases"
#define TSDB_INS_TABLE_FUNCTIONS "ins_functions"
#define TSDB_INS_TABLE_INDEXES "ins_indexes"
#define TSDB_INS_TABLE_STABLES "ins_stables"
#define TSDB_INS_TABLE_TABLES "ins_tables"
#define TSDB_INS_TABLE_TAGS "ins_tags"
#define TSDB_INS_TABLE_COLS "ins_columns"
#define TSDB_INS_TABLE_VC_COLS "ins_virtual_child_columns"
#define TSDB_INS_TABLE_TABLE_DISTRIBUTED "ins_table_distributed"
#define TSDB_INS_TABLE_USERS "ins_users"
#define TSDB_INS_TABLE_USERS_FULL "ins_users_full"
#define TSDB_INS_TABLE_TOKENS "ins_tokens"
#define TSDB_INS_TABLE_LICENCES "ins_grants"
#define TSDB_INS_TABLE_VGROUPS "ins_vgroups"
#define TSDB_INS_TABLE_VNODES "ins_vnodes"
#define TSDB_INS_TABLE_CONFIGS "ins_configs"
#define TSDB_INS_TABLE_DNODE_VARIABLES "ins_dnode_variables"
#define TSDB_INS_TABLE_SUBSCRIPTIONS "ins_subscriptions"
#define TSDB_INS_TABLE_TOPICS "ins_topics"
#define TSDB_INS_TABLE_STREAMS "ins_streams"
#define TSDB_INS_TABLE_STREAM_TASKS "ins_stream_tasks"
#define TSDB_INS_TABLE_STREAM_RECALCULATES "ins_stream_recalculates"
#define TSDB_INS_TABLE_USER_PRIVILEGES "ins_user_privileges"
#define TSDB_INS_TABLE_VIEWS "ins_views"
#define TSDB_INS_TABLE_COMPACTS "ins_compacts"
#define TSDB_INS_TABLE_COMPACT_DETAILS "ins_compact_details"
#define TSDB_INS_TABLE_SSMIGRATES "ins_ssmigrates"
#define TSDB_INS_TABLE_GRANTS_FULL "ins_grants_full"
#define TSDB_INS_TABLE_GRANTS_LOGS "ins_grants_logs"
#define TSDB_INS_TABLE_MACHINES "ins_machines"
#define TSDB_INS_TABLE_ENCRYPTIONS "ins_encryptions"
#define TSDB_INS_TABLE_TSMAS "ins_tsmas"
#define TSDB_INS_DISK_USAGE "ins_disk_usage"
#define TSDB_INS_TABLE_FILESETS "ins_filesets"
#define TSDB_INS_TABLE_TRANSACTION_DETAILS "ins_transaction_details"
#define TSDB_INS_TABLE_MOUNTS "ins_mounts"
#define TSDB_INS_TABLE_SCANS "ins_scans"
#define TSDB_INS_TABLE_SCAN_DETAILS "ins_scan_details"
#define TSDB_INS_TABLE_RSMAS "ins_rsmas"
#define TSDB_INS_TABLE_RETENTIONS "ins_retentions"
#define TSDB_INS_TABLE_RETENTION_DETAILS "ins_retention_details"
#define TSDB_INS_TABLE_ENCRYPT_ALGORITHMS "ins_encrypt_algorithms"
#define TSDB_INS_TABLE_ENCRYPT_STATUS "ins_encrypt_status"
#define TSDB_INS_TABLE_ROLES "ins_roles"
#define TSDB_INS_TABLE_ROLE_PRIVILEGES "ins_role_privileges"
#define TSDB_INS_TABLE_ROLE_COL_PRIVILEGES "ins_role_column_privileges"
#define TSDB_INS_TABLE_VIRTUAL_TABLES_REFERENCING "ins_virtual_tables_referencing"
#define TSDB_PERFORMANCE_SCHEMA_DB "performance_schema"
#define TSDB_PERFS_TABLE_SMAS "perf_smas"
#define TSDB_PERFS_TABLE_CONNECTIONS "perf_connections"
#define TSDB_PERFS_TABLE_QUERIES "perf_queries"
#define TSDB_PERFS_TABLE_CONSUMERS "perf_consumers"
#define TSDB_PERFS_TABLE_OFFSETS "perf_offsets"
#define TSDB_PERFS_TABLE_TRANS "perf_trans"
#define TSDB_PERFS_TABLE_INSTANCES "perf_instances"
#define TSDB_PERFS_TABLE_APPS "perf_apps"
#define TSDB_PERFS_TABLE_WRITE_METRICS "perf_write_metrics"
#define TSDB_AUDIT_DB "audit"
#define TSDB_AUDIT_STB_OPERATION "operations"
#define TSDB_AUDIT_CTB_OPERATION "t_operations_"
#define TSDB_AUDIT_CTB_OPERATION_LEN 13
typedef enum {
PRIV_CAT_BASIC = 0,
PRIV_CAT_PRIVILEGED = 1,
PRIV_CAT_SECURITY = 2,
PRIV_CAT_AUDIT = 3,
} ESysTblPrivCat;
typedef struct SSysDbTableSchema {
const char* name;
const int32_t type;
const int32_t bytes;
const bool sysInfo;
} SSysDbTableSchema;
typedef struct SSysTableMeta {
const char* name;
const SSysDbTableSchema* schema;
const int32_t colNum;
const bool sysInfo;
const int8_t privCat; // ESysTblPrivCat
} SSysTableMeta;
void getInfosDbMeta(const SSysTableMeta** pInfosTableMeta, size_t* size);
void getPerfDbMeta(const SSysTableMeta** pPerfsTableMeta, size_t* size);
void getVisibleInfosTablesNum(bool sysInfo, size_t* size);
bool invisibleColumn(bool sysInfo, int8_t tableType, int8_t flags);
#ifdef __cplusplus
}
#endif
#endif // TDENGINE_SYSTABLE_H