enh(query): add new api in taos.h
This commit is contained in:
parent
840074dfa3
commit
5bb16c3073
|
@ -99,7 +99,7 @@ typedef struct TAOS_FIELD_E {
|
||||||
#define DLL_EXPORT
|
#define DLL_EXPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef void (*__taos_async_fn_t)(void *param, TAOS_RES *, int code);
|
typedef void (*__taos_async_fn_t)(void *param, TAOS_RES *res, int code);
|
||||||
|
|
||||||
typedef struct TAOS_MULTI_BIND {
|
typedef struct TAOS_MULTI_BIND {
|
||||||
int buffer_type;
|
int buffer_type;
|
||||||
|
@ -131,8 +131,6 @@ DLL_EXPORT int taos_options(TSDB_OPTION option, const void *arg, ...);
|
||||||
DLL_EXPORT setConfRet taos_set_config(const char *config);
|
DLL_EXPORT setConfRet taos_set_config(const char *config);
|
||||||
DLL_EXPORT int taos_init(void);
|
DLL_EXPORT int taos_init(void);
|
||||||
DLL_EXPORT TAOS *taos_connect(const char *ip, const char *user, const char *pass, const char *db, uint16_t port);
|
DLL_EXPORT TAOS *taos_connect(const char *ip, const char *user, const char *pass, const char *db, uint16_t port);
|
||||||
DLL_EXPORT TAOS *taos_connect_l(const char *ip, int ipLen, const char *user, int userLen, const char *pass, int passLen,
|
|
||||||
const char *db, int dbLen, uint16_t port);
|
|
||||||
DLL_EXPORT TAOS *taos_connect_auth(const char *ip, const char *user, const char *auth, const char *db, uint16_t port);
|
DLL_EXPORT TAOS *taos_connect_auth(const char *ip, const char *user, const char *auth, const char *db, uint16_t port);
|
||||||
DLL_EXPORT void taos_close(TAOS *taos);
|
DLL_EXPORT void taos_close(TAOS *taos);
|
||||||
|
|
||||||
|
@ -195,6 +193,7 @@ DLL_EXPORT int taos_errno(TAOS_RES *tres);
|
||||||
DLL_EXPORT void taos_query_a(TAOS *taos, const char *sql, __taos_async_fn_t fp, void *param);
|
DLL_EXPORT void taos_query_a(TAOS *taos, const char *sql, __taos_async_fn_t fp, void *param);
|
||||||
DLL_EXPORT void taos_fetch_rows_a(TAOS_RES *res, __taos_async_fn_t fp, void *param);
|
DLL_EXPORT void taos_fetch_rows_a(TAOS_RES *res, __taos_async_fn_t fp, void *param);
|
||||||
DLL_EXPORT void taos_fetch_raw_block_a(TAOS_RES* res, __taos_async_fn_t fp, void* param);
|
DLL_EXPORT void taos_fetch_raw_block_a(TAOS_RES* res, __taos_async_fn_t fp, void* param);
|
||||||
|
DLL_EXPORT const void *taos_get_raw_block(TAOS_RES* res);
|
||||||
|
|
||||||
// Shuduo: temporary enable for app build
|
// Shuduo: temporary enable for app build
|
||||||
#if 1
|
#if 1
|
||||||
|
|
|
@ -822,10 +822,18 @@ void taos_fetch_rows_a(TAOS_RES *res, __taos_async_fn_t fp, void *param) {
|
||||||
void taos_fetch_raw_block_a(TAOS_RES* res, __taos_async_fn_t fp, void* param) {
|
void taos_fetch_raw_block_a(TAOS_RES* res, __taos_async_fn_t fp, void* param) {
|
||||||
ASSERT(res != NULL && fp != NULL);
|
ASSERT(res != NULL && fp != NULL);
|
||||||
SRequestObj *pRequest = res;
|
SRequestObj *pRequest = res;
|
||||||
|
|
||||||
pRequest->body.resInfo.convertUcs4 = false;
|
pRequest->body.resInfo.convertUcs4 = false;
|
||||||
taos_fetch_rows_a(res, fp, param);
|
taos_fetch_rows_a(res, fp, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const void* taos_get_raw_block(TAOS_RES* res) {
|
||||||
|
ASSERT(res != NULL);
|
||||||
|
SRequestObj* pRequest = res;
|
||||||
|
|
||||||
|
return pRequest->body.resInfo.pData;
|
||||||
|
}
|
||||||
|
|
||||||
TAOS_SUB *taos_subscribe(TAOS *taos, int restart, const char *topic, const char *sql, TAOS_SUBSCRIBE_CALLBACK fp,
|
TAOS_SUB *taos_subscribe(TAOS *taos, int restart, const char *topic, const char *sql, TAOS_SUBSCRIBE_CALLBACK fp,
|
||||||
void *param, int interval) {
|
void *param, int interval) {
|
||||||
// TODO
|
// TODO
|
||||||
|
|
Loading…
Reference in New Issue