more code

This commit is contained in:
Hongze Cheng 2023-04-23 18:00:02 +08:00
parent 651ca6aca2
commit 50319f2630
3 changed files with 31 additions and 18 deletions

View File

@ -24,9 +24,21 @@ extern "C" {
// SDataFileReader ============================================= // SDataFileReader =============================================
typedef struct SDataFileReader SDataFileReader; typedef struct SDataFileReader SDataFileReader;
typedef struct SDataFileReaderConfig SDataFileReaderConfig;
// SDataFileWriter ============================================= // SDataFileWriter =============================================
typedef struct SDataFileWriter SDataFileWriter; typedef struct SDataFileWriter SDataFileWriter;
typedef struct SDataFileWriterConfig SDataFileWriterConfig;
struct SDataFileReaderConfig {
STsdb *pTsdb;
// TODO
};
struct SDataFileWriterConfig {
STsdb *pTsdb;
// TODO
};
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -27,9 +27,9 @@ typedef struct SFileOp SFileOp;
typedef struct SSttLvl SSttLvl; typedef struct SSttLvl SSttLvl;
typedef enum { typedef enum {
TSDB_FOP_EXTEND = -2, TSDB_FOP_NONE = 0,
TSDB_FOP_EXTEND,
TSDB_FOP_CREATE, TSDB_FOP_CREATE,
TSDB_FOP_NONE,
TSDB_FOP_DELETE, TSDB_FOP_DELETE,
TSDB_FOP_TRUNCATE, TSDB_FOP_TRUNCATE,
} tsdb_fop_t; } tsdb_fop_t;
@ -49,14 +49,14 @@ struct SFileOp {
struct SSttLvl { struct SSttLvl {
int32_t level; int32_t level;
int32_t nStt; int32_t nStt;
struct STFile *fSttList; STFile *fSttList;
LISTD(SSttLvl) listNode; LISTD(SSttLvl) listNode;
}; };
struct SFileSet { struct SFileSet {
int32_t fid; int32_t fid;
int64_t nextid; int64_t nextid;
struct STFile *farr[TSDB_FTYPE_MAX]; // file array STFile *farr[TSDB_FTYPE_MAX]; // file array
SSttLvl lvl0; // level 0 of .stt SSttLvl lvl0; // level 0 of .stt
}; };

View File

@ -15,11 +15,12 @@
#include "dev.h" #include "dev.h"
// struct SDataFReader { // SDataFileReader =============================================
// STsdb *pTsdb; struct SDataFileReader {
// // TODO // TODO
// }; };
// struct SDataFWriter { // SDataFileWriter =============================================
// STsdb *pTsdb; struct SDataFileWriter {
// }; // TODO
};