TDengine/source/dnode/mnode/impl/inc/mndStb.h

58 lines
2.4 KiB
C
Raw Normal View History

2021-09-22 08:15:20 +00:00
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
2021-12-10 07:21:34 +00:00
#ifndef _TD_MND_STB_H_
#define _TD_MND_STB_H_
2021-10-04 09:44:39 +00:00
2021-11-27 14:56:18 +00:00
#include "mndInt.h"
2021-10-04 09:44:39 +00:00
2021-10-16 07:16:05 +00:00
#ifdef __cplusplus
extern "C" {
#endif
2021-10-04 09:44:39 +00:00
2022-02-15 07:24:27 +00:00
int32_t mndInitStb(SMnode *pMnode);
void mndCleanupStb(SMnode *pMnode);
2021-12-23 12:28:08 +00:00
SStbObj *mndAcquireStb(SMnode *pMnode, char *stbName);
2022-02-15 07:24:27 +00:00
void mndReleaseStb(SMnode *pMnode, SStbObj *pStb);
SSdbRaw *mndStbActionEncode(SStbObj *pStb);
2022-06-16 08:01:22 +00:00
int32_t mndValidateStbInfo(SMnode *pMnode, SSTableVersion *pStbs, int32_t numOfStbs, void **ppRsp, int32_t *pRspLen);
2022-04-28 08:31:19 +00:00
int32_t mndGetNumOfStbs(SMnode *pMnode, char *dbName, int32_t *pNumOfStbs);
2022-02-06 07:37:16 +00:00
2022-05-06 17:47:45 +00:00
int32_t mndCheckCreateStbReq(SMCreateStbReq *pCreate);
SDbObj *mndAcquireDbByStb(SMnode *pMnode, const char *stbName);
int32_t mndBuildStbFromReq(SMnode *pMnode, SStbObj *pDst, SMCreateStbReq *pCreate, SDbObj *pDb);
int32_t mndAddStbToTrans(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, SStbObj *pStb);
2022-08-18 06:26:11 +00:00
void mndFreeStb(SStbObj *pStb);
2022-10-13 03:56:16 +00:00
int32_t mndBuildSMCreateStbRsp(SMnode *pMnode, char *dbFName, char *stbFName, void **pCont, int32_t *pLen);
2022-05-06 17:47:45 +00:00
2022-06-16 08:01:22 +00:00
void mndExtractDbNameFromStbFullName(const char *stbFullName, char *dst);
2023-03-30 10:53:50 +00:00
void mndExtractShortDbNameFromStbFullName(const char *stbFullName, char *dst);
void mndExtractShortDbNameFromDbFullName(const char *stbFullName, char *dst);
2022-06-16 08:01:22 +00:00
void mndExtractTbNameFromStbFullName(const char *stbFullName, char *dst, int32_t dstSize);
2022-09-26 08:18:48 +00:00
const char *mndGetStbStr(const char *src);
2023-02-03 14:19:01 +00:00
int32_t mndAllocStbSchemas(const SStbObj *pOld, SStbObj *pNew);
int32_t mndCheckColAndTagModifiable(SMnode *pMnode, const char *stbFullName, int64_t suid, col_id_t colId);
void *mndBuildVCreateStbReq(SMnode *pMnode, SVgObj *pVgroup, SStbObj *pStb, int32_t *pContLen, void *alterOriData,
int32_t alterOriDataLen);
2023-05-15 03:20:27 +00:00
int32_t mndSetForceDropCreateStbRedoActions(SMnode *pMnode, STrans *pTrans, SVgObj *pVgroup, SStbObj *pStb);
2023-02-03 14:19:01 +00:00
2021-10-16 07:16:05 +00:00
#ifdef __cplusplus
}
#endif
2021-10-04 09:44:39 +00:00
2021-12-10 07:21:34 +00:00
#endif /*_TD_MND_STB_H_*/