[td-11818]refactor.
This commit is contained in:
parent
b55da7758e
commit
57281f6e8f
|
@ -129,7 +129,6 @@ typedef struct SRequestObj {
|
||||||
char *msgBuf;
|
char *msgBuf;
|
||||||
void *pInfo; // sql parse info, generated by parser module
|
void *pInfo; // sql parse info, generated by parser module
|
||||||
int32_t code;
|
int32_t code;
|
||||||
uint64_t affectedRows; // todo remove it
|
|
||||||
SQueryExecMetric metric;
|
SQueryExecMetric metric;
|
||||||
SRequestSendRecvBody body;
|
SRequestSendRecvBody body;
|
||||||
} SRequestObj;
|
} SRequestObj;
|
||||||
|
|
|
@ -250,8 +250,9 @@ int32_t scheduleQuery(SRequestObj* pRequest, SQueryDag* pDag) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pRequest->affectedRows = res.numOfRows;
|
pRequest->body.resInfo.numOfRows = res.numOfRows;
|
||||||
return res.code;
|
pRequest->code = res.code;
|
||||||
|
return pRequest->code;
|
||||||
}
|
}
|
||||||
|
|
||||||
return scheduleAsyncExecJob(pRequest->pTscObj->pTransporter, NULL, pDag, &pRequest->body.pQueryJob);
|
return scheduleAsyncExecJob(pRequest->pTscObj->pTransporter, NULL, pDag, &pRequest->body.pQueryJob);
|
||||||
|
|
|
@ -265,7 +265,13 @@ const char *taos_data_type(int type) {
|
||||||
const char *taos_get_client_info() { return version; }
|
const char *taos_get_client_info() { return version; }
|
||||||
|
|
||||||
int taos_affected_rows(TAOS_RES *res) {
|
int taos_affected_rows(TAOS_RES *res) {
|
||||||
return ((SRequestObj*)res)->affectedRows;
|
if (res == NULL) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
SRequestObj* pRequest = (SRequestObj*) res;
|
||||||
|
SReqResultInfo* pResInfo = &pRequest->body.resInfo;
|
||||||
|
return pResInfo->numOfRows;
|
||||||
}
|
}
|
||||||
|
|
||||||
int taos_result_precision(TAOS_RES *res) { return TSDB_TIME_PRECISION_MILLI; }
|
int taos_result_precision(TAOS_RES *res) { return TSDB_TIME_PRECISION_MILLI; }
|
||||||
|
|
Loading…
Reference in New Issue