add last key function for stream
This commit is contained in:
parent
5c0b0e2266
commit
6bbba9aca7
|
@ -104,9 +104,10 @@ void tsdbClearTableCfg(STableCfg *config);
|
||||||
int32_t tsdbGetTableTagVal(TsdbRepoT *repo, STableId id, int32_t col, int16_t *type, int16_t *bytes, char **val);
|
int32_t tsdbGetTableTagVal(TsdbRepoT *repo, STableId id, int32_t col, int16_t *type, int16_t *bytes, char **val);
|
||||||
int32_t tsdbTableGetName(TsdbRepoT *repo, STableId id, char** name);
|
int32_t tsdbTableGetName(TsdbRepoT *repo, STableId id, char** name);
|
||||||
|
|
||||||
int tsdbCreateTable(TsdbRepoT *repo, STableCfg *pCfg);
|
int tsdbCreateTable(TsdbRepoT *repo, STableCfg *pCfg);
|
||||||
int tsdbDropTable(TsdbRepoT *pRepo, STableId tableId);
|
int tsdbDropTable(TsdbRepoT *pRepo, STableId tableId);
|
||||||
int tsdbAlterTable(TsdbRepoT *repo, STableCfg *pCfg);
|
int tsdbAlterTable(TsdbRepoT *repo, STableCfg *pCfg);
|
||||||
|
TSKEY tsdbGetTableLastKey(TsdbRepoT *repo, int64_t uid);
|
||||||
|
|
||||||
// the TSDB repository info
|
// the TSDB repository info
|
||||||
typedef struct STsdbRepoInfo {
|
typedef struct STsdbRepoInfo {
|
||||||
|
|
|
@ -367,6 +367,15 @@ int tsdbAlterTable(TsdbRepoT *pRepo, STableCfg *pCfg) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TSKEY tsdbGetTableLastKey(TsdbRepoT *repo, int64_t uid) {
|
||||||
|
STsdbRepo *pRepo = (STsdbRepo *)repo;
|
||||||
|
|
||||||
|
STable *pTable = tsdbGetTableByUid(pRepo->tsdbMeta, uid);
|
||||||
|
if (pTable == NULL) return -1;
|
||||||
|
|
||||||
|
return TSDB_GET_TABLE_LAST_KEY(pTable);
|
||||||
|
}
|
||||||
|
|
||||||
int tsdbDropTable(TsdbRepoT *repo, STableId tableId) {
|
int tsdbDropTable(TsdbRepoT *repo, STableId tableId) {
|
||||||
if (repo == NULL) return -1;
|
if (repo == NULL) return -1;
|
||||||
STsdbRepo *pRepo = (STsdbRepo *)repo;
|
STsdbRepo *pRepo = (STsdbRepo *)repo;
|
||||||
|
|
Loading…
Reference in New Issue