未验证 提交 340cc84d 编写于 作者: S slguan 提交者: GitHub

Merge pull request #1753 from taosdata/feature/add_a_function_for_stream

add last key function for stream
...@@ -107,6 +107,7 @@ int32_t tsdbTableGetName(TsdbRepoT *repo, STableId id, char** name); ...@@ -107,6 +107,7 @@ 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) { ...@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册