TDengine/include/libs/command/command.h

38 lines
1.6 KiB
C
Raw Permalink Normal View History

/*
* 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/>.
*/
#ifndef TDENGINE_COMMAND_H
#define TDENGINE_COMMAND_H
#include "cmdnodes.h"
2022-03-31 10:02:58 +00:00
#include "plannodes.h"
2022-08-24 09:36:10 +00:00
#include "tmsg.h"
2022-04-01 11:45:45 +00:00
typedef struct SExplainCtx SExplainCtx;
typedef struct SExplainPlanCtx SExplainPlanCtx;
2022-04-01 11:45:45 +00:00
int32_t qExecCommand(int64_t *pConnId, bool sysInfoUser, uint8_t showVarPrivMask, SNode *pStmt,
SRetrieveTableRsp **pRsp, int8_t biMode, void *charsetCxt);
2022-03-31 10:02:58 +00:00
int32_t qExecStaticExplain(SQueryPlan *pDag, SRetrieveTableRsp **pRsp);
2022-04-11 06:15:09 +00:00
int32_t qExecExplainBegin(SQueryPlan *pDag, SExplainCtx **pCtx, int64_t startTs);
2022-04-02 11:31:52 +00:00
int32_t qExecExplainEnd(SExplainCtx *pCtx, SRetrieveTableRsp **pRsp);
int32_t qExplainUpdateExecInfo(SExplainCtx *pCtx, SExplainPlanCtx *pCurrPlanCtx, SExplainRsp *pRspMsg, int32_t groupId, SRetrieveTableRsp **pRsp);
2022-04-01 11:45:45 +00:00
void qExplainFreeCtx(SExplainCtx *pCtx);
2024-10-09 01:45:56 +00:00
int32_t formatDurationOrKeep(char* buffer, int64_t bufSize, int32_t timeInMinutes);
SExplainPlanCtx* qExplainGetCurrPlan(SExplainCtx *pCtx, int32_t subJobId);
2022-03-31 10:02:58 +00:00
#endif