systable.h 3.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
/*
 * 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/>.
 */

#ifdef __cplusplus
extern "C" {
#endif

#include "os.h"

#ifndef TDENGINE_SYSTABLE_H
#define TDENGINE_SYSTABLE_H

25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
#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_BNODES            "ins_bnodes"
#define TSDB_INS_TABLE_SNODES            "ins_snodes"
#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_TABLE_DISTRIBUTED "ins_table_distributed"
#define TSDB_INS_TABLE_USERS             "ins_users"
#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"
46

L
Liu Jicong 已提交
47
#define TSDB_PERFORMANCE_SCHEMA_DB     "performance_schema"
D
dapan1121 已提交
48 49 50 51 52 53 54 55 56 57
#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_TOPICS        "perf_topics"
#define TSDB_PERFS_TABLE_CONSUMERS     "perf_consumers"
#define TSDB_PERFS_TABLE_SUBSCRIPTIONS "perf_subscriptions"
#define TSDB_PERFS_TABLE_OFFSETS       "perf_offsets"
#define TSDB_PERFS_TABLE_TRANS         "perf_trans"
#define TSDB_PERFS_TABLE_STREAMS       "perf_streams"
#define TSDB_PERFS_TABLE_APPS          "perf_apps"
58 59

typedef struct SSysDbTableSchema {
L
Liu Jicong 已提交
60
  const char*   name;
61 62
  const int32_t type;
  const int32_t bytes;
63
  const bool    sysInfo;
64 65 66
} SSysDbTableSchema;

typedef struct SSysTableMeta {
L
Liu Jicong 已提交
67 68
  const char*              name;
  const SSysDbTableSchema* schema;
69
  const int32_t            colNum;
70
  const bool               sysInfo;
71 72 73 74
} SSysTableMeta;

void getInfosDbMeta(const SSysTableMeta** pInfosTableMeta, size_t* size);
void getPerfDbMeta(const SSysTableMeta** pPerfsTableMeta, size_t* size);
75 76
void getVisibleInfosTablesNum(bool sysInfo, size_t* size);
bool invisibleColumn(bool sysInfo, int8_t tableType, int8_t flags);
77 78 79 80 81 82

#ifdef __cplusplus
}
#endif

#endif  // TDENGINE_SYSTABLE_H