add last key function for stream
This commit is contained in:
parent
5c0b0e2266
commit
6bbba9aca7
|
@ -107,6 +107,7 @@ int32_t tsdbTableGetName(TsdbRepoT *repo, STableId id, char** name);
|
|||
int tsdbCreateTable(TsdbRepoT *repo, STableCfg *pCfg);
|
||||
int tsdbDropTable(TsdbRepoT *pRepo, STableId tableId);
|
||||
int tsdbAlterTable(TsdbRepoT *repo, STableCfg *pCfg);
|
||||
TSKEY tsdbGetTableLastKey(TsdbRepoT *repo, int64_t uid);
|
||||
|
||||
// the TSDB repository info
|
||||
typedef struct STsdbRepoInfo {
|
||||
|
|
|
@ -367,6 +367,15 @@ int tsdbAlterTable(TsdbRepoT *pRepo, STableCfg *pCfg) {
|
|||
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) {
|
||||
if (repo == NULL) return -1;
|
||||
STsdbRepo *pRepo = (STsdbRepo *)repo;
|
||||
|
|
Loading…
Reference in New Issue