提交 132e3b45 编写于 作者: H Haojun Liao

[td-10564] refactor query statement parse procedure.

上级 c3881e1a
...@@ -46,6 +46,11 @@ typedef void **TAOS_ROW; ...@@ -46,6 +46,11 @@ typedef void **TAOS_ROW;
#define TSDB_DATA_TYPE_USMALLINT 12 // 2 bytes #define TSDB_DATA_TYPE_USMALLINT 12 // 2 bytes
#define TSDB_DATA_TYPE_UINT 13 // 4 bytes #define TSDB_DATA_TYPE_UINT 13 // 4 bytes
#define TSDB_DATA_TYPE_UBIGINT 14 // 8 bytes #define TSDB_DATA_TYPE_UBIGINT 14 // 8 bytes
#define TSDB_DATA_TYPE_VARCHAR 15 // string
#define TSDB_DATA_TYPE_JSON 16 // json
#define TSDB_DATA_TYPE_DECIMAL 17 // decimal
#define TSDB_DATA_TYPE_BLOB 18 // binary string
#define TSDB_DATA_TYPE_LONGBLOB 19 // long binary string
typedef enum { typedef enum {
TSDB_OPTION_LOCALE, TSDB_OPTION_LOCALE,
...@@ -157,7 +162,6 @@ DLL_EXPORT int taos_errno(TAOS_RES *tres); ...@@ -157,7 +162,6 @@ DLL_EXPORT int taos_errno(TAOS_RES *tres);
DLL_EXPORT void taos_query_a(TAOS *taos, const char *sql, void (*fp)(void *param, TAOS_RES *, int code), void *param); DLL_EXPORT void taos_query_a(TAOS *taos, const char *sql, void (*fp)(void *param, TAOS_RES *, int code), void *param);
DLL_EXPORT void taos_fetch_rows_a(TAOS_RES *res, void (*fp)(void *param, TAOS_RES *, int numOfRows), void *param); DLL_EXPORT void taos_fetch_rows_a(TAOS_RES *res, void (*fp)(void *param, TAOS_RES *, int numOfRows), void *param);
//DLL_EXPORT void taos_fetch_row_a(TAOS_RES *res, void (*fp)(void *param, TAOS_RES *, TAOS_ROW row), void *param);
typedef void (*TAOS_SUBSCRIBE_CALLBACK)(TAOS_SUB* tsub, TAOS_RES *res, void* param, int code); typedef void (*TAOS_SUBSCRIBE_CALLBACK)(TAOS_SUB* tsub, TAOS_RES *res, void* param, int code);
DLL_EXPORT TAOS_SUB *taos_subscribe(TAOS* taos, int restart, const char* topic, const char *sql, TAOS_SUBSCRIBE_CALLBACK fp, void *param, int interval); DLL_EXPORT TAOS_SUB *taos_subscribe(TAOS* taos, int restart, const char* topic, const char *sql, TAOS_SUBSCRIBE_CALLBACK fp, void *param, int interval);
......
...@@ -96,7 +96,7 @@ typedef struct STagCond { ...@@ -96,7 +96,7 @@ typedef struct STagCond {
typedef struct STableMetaInfo { typedef struct STableMetaInfo {
STableMeta *pTableMeta; // table meta, cached in client side and acquired by name STableMeta *pTableMeta; // table meta, cached in client side and acquired by name
uint32_t tableMetaSize; uint32_t tableMetaSize;
size_t tableMetaCapacity; // size_t tableMetaCapacity;
SVgroupsInfo *vgroupList; SVgroupsInfo *vgroupList;
SArray *pVgroupTables; // SArray<SVgroupTableInfo> SArray *pVgroupTables; // SArray<SVgroupTableInfo>
......
...@@ -120,29 +120,6 @@ int64_t taosGetIntervalStartTimestamp(int64_t startTime, int64_t slidingTime, in ...@@ -120,29 +120,6 @@ int64_t taosGetIntervalStartTimestamp(int64_t startTime, int64_t slidingTime, in
#endif #endif
/*
* tablePrefix.columnName
* extract table name and save it in pTable, with only column name in pToken
*/
//void extractTableNameFromToken(SStrToken* pToken, SStrToken* pTable) {
// const char sep = TS_PATH_DELIMITER[0];
//
// if (pToken == pTable || pToken == NULL || pTable == NULL) {
// return;
// }
//
// char* r = strnchr(pToken->z, sep, pToken->n, false);
//
// if (r != NULL) { // record the table name token
// pTable->n = (uint32_t)(r - pToken->z);
// pTable->z = pToken->z;
//
// r += 1;
// pToken->n -= (uint32_t)(r - pToken->z);
// pToken->z = r;
// }
//}
static struct SSchema _s = { static struct SSchema _s = {
.colId = TSDB_TBNAME_COLUMN_INDEX, .colId = TSDB_TBNAME_COLUMN_INDEX,
.type = TSDB_DATA_TYPE_BINARY, .type = TSDB_DATA_TYPE_BINARY,
......
...@@ -42,12 +42,6 @@ enum SQL_NODE_FROM_TYPE { ...@@ -42,12 +42,6 @@ enum SQL_NODE_FROM_TYPE {
SQL_NODE_FROM_TABLELIST = 2, SQL_NODE_FROM_TABLELIST = 2,
}; };
//enum SQL_EXPR_FLAG {
// EXPR_FLAG_TS_ERROR = 1,
// EXPR_FLAG_NS_TIMESTAMP = 2,
// EXPR_FLAG_TIMESTAMP_VAR = 3,
//};
extern char tTokenTypeSwitcher[13]; extern char tTokenTypeSwitcher[13];
#define toTSDBType(x) \ #define toTSDBType(x) \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册