提交 2ad90daa 编写于 作者: H Hongze Cheng

more

上级 3198baec
...@@ -4,10 +4,53 @@ ...@@ -4,10 +4,53 @@
#include "tsdb.h" #include "tsdb.h"
typedef struct STable typedef enum {
TSDB_TABLE_NORMAL,
TSDB_TABLE_STABLE,
TSDB_TABLE_SUPER
} TSDB_TABLE_TYPE;
// Below is the struct definition of super table
// TODO: May merge all table definitions
typedef struct _super_table {
int64_t uid;
char *tableName;
int64_t createdTime;
// TODO: try to merge the two schema into one
SSchema *pSchema;
SSchema *pTagSchema;
// A index created for all tables created using this super table
SSkipList * pIndex;
} SSTable;
// Normal table struct definition, table not
// created from super table
typedef struct SNTable
{ {
STableId tid; tsdb_id_t tableId;
int64_t uid;
char *tableName; char *tableName;
int64_t createdTime;
SSchema *pSchema
} SNTable;
// Table created from super table
typedef struct STable {
tsdb_id_t tableId;
int64_t uid;
char *tableName;
int64_t createdTime;
// super table UID
int64_t stableUid;
// Tag values for this table
char *pTagVal;
} STable; } STable;
#define TSDB_GET_TABLE_ID(pTable) (((STable *)pTable)->tid).tableId #define TSDB_GET_TABLE_ID(pTable) (((STable *)pTable)->tid).tableId
......
...@@ -34,6 +34,10 @@ typedef struct STSDBRepo ...@@ -34,6 +34,10 @@ typedef struct STSDBRepo
*/ */
void *pSTableDict; void *pSTableDict;
/* File Store
*/
void *pFileStore;
pthread_mutext_t tsdbMutex; pthread_mutext_t tsdbMutex;
} STSDBRepo; } STSDBRepo;
......
#include "tsdb.h" #include "tsdb.h"
typedef struct STable
{
/* data */
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册