• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

taosdata / TDengine / #4892

20 Dec 2025 01:15PM UTC coverage: 65.571% (+0.02%) from 65.549%
#4892

push

travis-ci

web-flow
feat: support taos_connect_with func (#33952)

* feat: support taos_connect_with

* refactor: enhance connection options and add tests for taos_set_option and taos_connect_with

* fix: handle NULL keys and values in taos_connect_with options

* fix: revert TAOSWS_GIT_TAG to default value "main"

* docs: add TLS configuration options for WebSocket connections in documentation

* docs: modify zh docs and add en docs

* chore: update taos.cfg

* docs: add examples

* docs: add error handling for connection failure in example code

2 of 82 new or added lines in 3 files covered. (2.44%)

527 existing lines in 120 files now uncovered.

182859 of 278870 relevant lines covered (65.57%)

104634355.9 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

68.74
/source/client/wrapper/src/wrapperFunc.c
1
/*
2
 * Copyright (c) 2025 TAOS Data, Inc. <jhtao@taosdata.com>
3
 *
4
 * This program is free software: you can use, redistribute, and/or modify
5
 * it under the terms of the GNU Affero General Public License, version 3
6
 * or later ("AGPL"), as published by the Free Software Foundation.
7
 *
8
 * This program is distributed in the hope that it will be useful, but WITHOUT
9
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
 * FITNESS FOR A PARTICULAR PURPOSE.
11
 *
12
 * You should have received a copy of the GNU Affero General Public License
13
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14
 */
15

16
#include "version.h"
17
#include "wrapper.h"
18

19
static TdThreadOnce tsDriverOnce = PTHREAD_ONCE_INIT;
20
volatile int32_t    tsDriverOnceRet = 0;
21

22
static TdThreadOnce tsInitOnce = PTHREAD_ONCE_INIT;
23
volatile int32_t    tsInitOnceRet = 0;
24

25
#define ERR_VOID(code) \
26
  terrno = code;       \
27
  return;
28

29
#define ERR_PTR(code) \
30
  terrno = code;      \
31
  return NULL;
32

33
#define ERR_INT(code) \
34
  terrno = code;      \
35
  return -1;
36

37
#define ERR_BOOL(code) \
38
  terrno = code;       \
39
  return false;
40

41
#define ERR_CONFRET(code)           \
42
  terrno = code;                    \
43
  setConfRet ret = {.retCode = -1}; \
44
  return ret;
45

46
#define CHECK_VOID(fp)               \
47
  if (tsDriver == NULL) {            \
48
    ERR_VOID(TSDB_CODE_DLL_NOT_LOAD) \
49
  }                                  \
50
  if (fp == NULL) {                  \
51
    ERR_VOID(TSDB_CODE_DLL_FUNC_NOT_LOAD) \
52
  }
53

54
#define CHECK_PTR(fp)               \
55
  if (tsDriver == NULL) {           \
56
    ERR_PTR(TSDB_CODE_DLL_NOT_LOAD) \
57
  }                                 \
58
  if (fp == NULL) {                 \
59
    ERR_PTR(TSDB_CODE_DLL_FUNC_NOT_LOAD) \
60
  }
61

62
#define CHECK_INT(fp)               \
63
  if (tsDriver == NULL) {           \
64
    ERR_INT(TSDB_CODE_DLL_NOT_LOAD) \
65
  }                                 \
66
  if (fp == NULL) {                 \
67
    ERR_INT(TSDB_CODE_DLL_FUNC_NOT_LOAD) \
68
  }
69

70
#define CHECK_BOOL(fp)               \
71
  if (tsDriver == NULL) {            \
72
    ERR_BOOL(TSDB_CODE_DLL_NOT_LOAD) \
73
  }                                  \
74
  if (fp == NULL) {                  \
75
    ERR_BOOL(TSDB_CODE_DLL_FUNC_NOT_LOAD) \
76
  }
77

78
#define CHECK_CONFRET(fp)               \
79
  if (tsDriver == NULL) {               \
80
    ERR_CONFRET(TSDB_CODE_DLL_NOT_LOAD) \
81
  }                                     \
82
  if (fp == NULL) {                     \
83
    ERR_CONFRET(TSDB_CODE_DLL_FUNC_NOT_LOAD) \
84
  }
85

86
setConfRet taos_set_config(const char *config) {
56✔
87
  if (taos_init() != 0) {
56✔
88
    ERR_CONFRET(TSDB_CODE_DLL_NOT_LOAD)
×
89
  }
90

91
  CHECK_CONFRET(fp_taos_set_config);
56✔
92
  return (*fp_taos_set_config)(config);
56✔
93
}
94

95
static void taos_init_driver(void) {
1,282,060✔
96
  tsDriverOnceRet = taosDriverInit(tsDriverType);
1,282,060✔
97
  if (tsDriverOnceRet != 0) return;
1,282,060✔
98

99
  tsDriverOnceRet = 0;
1,282,060✔
100
}
101
static void taos_init_wrapper(void) {
1,279,418✔
102
  if (fp_taos_init == NULL) {
1,279,418✔
103
    terrno = TSDB_CODE_DLL_FUNC_NOT_LOAD;
×
104
    tsInitOnceRet = -1;
×
105
  } else {
106
    tsInitOnceRet = (*fp_taos_init)();
1,279,418✔
107
  }
108
}
1,279,418✔
109

110
int taos_init(void) {
849,647,848✔
111
  (void)taosThreadOnce(&tsDriverOnce, taos_init_driver);
849,647,848✔
112
  (void)taosThreadOnce(&tsInitOnce, taos_init_wrapper);
849,644,992✔
113
  return tsInitOnceRet;
849,643,629✔
114
}
115

116
void taos_cleanup(void) {
927,445✔
117
  CHECK_VOID(fp_taos_cleanup);
927,445✔
118
  (*fp_taos_cleanup)();
927,445✔
119
}
120

121
int taos_options(TSDB_OPTION option, const void *arg, ...) {
1,534,920✔
122
  if (option == TSDB_OPTION_DRIVER) {
1,534,920✔
123
    if (tsDriver == NULL) {
949,159✔
124
      if (strcasecmp((const char *)arg, "native") == 0) {
949,159✔
125
        tsDriverType = DRIVER_NATIVE;
933,078✔
126
        return 0;
933,078✔
127
      }
128
      if (strcasecmp((const char *)arg, "websocket") == 0) {
16,081✔
129
        tsDriverType = DRIVER_WEBSOCKET;
16,081✔
130
        return 0;
16,081✔
131
      }
132
    }
133
    terrno = TSDB_CODE_REPEAT_INIT;
×
134
    return -1;
×
135
  }
136
  (void)taosThreadOnce(&tsDriverOnce, taos_init_driver);
585,761✔
137

138
  CHECK_INT(fp_taos_options);
585,761✔
139
  return (*fp_taos_options)(option, arg);
585,761✔
140
}
141

142
int taos_options_connection(TAOS *taos, TSDB_OPTION_CONNECTION option, const void *arg, ...) {
×
143
  CHECK_INT(fp_taos_options_connection);
×
144
  return (*fp_taos_options_connection)(taos, option, (const char *)arg);
×
145
}
146

147
TAOS *taos_connect(const char *ip, const char *user, const char *pass, const char *db, uint16_t port) {
2,863,664✔
148
  if (taos_init() != 0) {
2,863,664✔
149
    //terrno = TSDB_CODE_DLL_NOT_LOAD;
150
    return NULL;
×
151
  }
152

153
  CHECK_PTR(fp_taos_connect);
2,863,528✔
154
  return (*fp_taos_connect)(ip, user, pass, db, port);
2,863,528✔
155
}
156

157
TAOS *taos_connect_totp(const char *ip, const char *user, const char *pass, const char* totp, const char *db, uint16_t port) {
35✔
158
  if (taos_init() != 0) {
35✔
159
    terrno = TSDB_CODE_DLL_NOT_LOAD;
×
160
    return NULL;
×
161
  }
162

163
  CHECK_PTR(fp_taos_connect_totp);
35✔
164
  return (*fp_taos_connect_totp)(ip, user, pass, totp, db, port);
35✔
165
}
166

167
int taos_connect_test(const char *ip, const char *user, const char *pass, const char* totp, const char *db, uint16_t port) {
×
168
  if (taos_init() != 0) {
×
169
    return TSDB_CODE_DLL_NOT_LOAD;
×
170
  }
171
  if (tsDriver == NULL) {
×
172
    return TSDB_CODE_DLL_NOT_LOAD;
×
173
  }
174
  if (fp_taos_connect_test == NULL) {
×
175
    return TSDB_CODE_DLL_FUNC_NOT_LOAD;
×
176
  }
177
  return (*fp_taos_connect_test)(ip, user, pass, totp, db, port);
×
178
}
179

180
TAOS *taos_connect_token(const char *ip, const char *token, const char *db, uint16_t port) {
×
181
  if (taos_init() != 0) {
×
182
    terrno = TSDB_CODE_DLL_NOT_LOAD;
×
183
    return NULL;
×
184
  }
185

186
  CHECK_PTR(fp_taos_connect_token);
×
187
  return (*fp_taos_connect_token)(ip, token, db, port);
×
188
}
189

190
TAOS *taos_connect_auth(const char *ip, const char *user, const char *auth, const char *db, uint16_t port) {
365✔
191
  if (taos_init() != 0) {
365✔
192
    terrno = TSDB_CODE_DLL_NOT_LOAD;
×
193
    return NULL;
×
194
  }
195

196
  CHECK_PTR(fp_taos_connect_auth);
365✔
197
  return (*fp_taos_connect_auth)(ip, user, auth, db, port);
365✔
198
}
199

NEW
200
void taos_set_option(OPTIONS *options, const char *key, const char *value) {
×
NEW
201
  if (taos_init() != 0) {
×
NEW
202
    return;
×
203
  }
204

NEW
205
  CHECK_VOID(fp_taos_set_option);
×
NEW
206
  (*fp_taos_set_option)(options, key, value);
×
207
}
208

NEW
209
TAOS *taos_connect_with(const OPTIONS *options) {
×
NEW
210
  if (taos_init() != 0) {
×
NEW
211
    return NULL;
×
212
  }
213

NEW
214
  CHECK_PTR(fp_taos_connect_with);
×
NEW
215
  return (*fp_taos_connect_with)(options);
×
216
}
217

218
TAOS *taos_connect_with_dsn(const char *dsn) {
840✔
219
  if (taos_init() != 0) {
840✔
220
    return NULL;
×
221
  }
222

223
  CHECK_PTR(fp_taos_connect_with_dsn);
840✔
224
  return (*fp_taos_connect_with_dsn)(dsn);
840✔
225
}
226

227
void taos_close(TAOS *taos) {
2,857,114✔
228
  CHECK_VOID(fp_taos_close);
2,857,114✔
229
  (*fp_taos_close)(taos);
2,857,114✔
230
}
231

232
const char *taos_data_type(int type) {
×
233
  (void)taos_init();
×
234
  CHECK_PTR(fp_taos_data_type);
×
235
  return (*fp_taos_data_type)(type);
×
236
}
237

238
TAOS_STMT *taos_stmt_init(TAOS *taos) {
344,015✔
239
  CHECK_PTR(fp_taos_stmt_init);
344,015✔
240
  return (*fp_taos_stmt_init)(taos);
344,015✔
241
}
242

243
TAOS_STMT *taos_stmt_init_with_reqid(TAOS *taos, int64_t reqid) {
12,737✔
244
  CHECK_PTR(fp_taos_stmt_init_with_reqid);
12,737✔
245
  return (*fp_taos_stmt_init_with_reqid)(taos, reqid);
12,737✔
246
}
247

248
TAOS_STMT *taos_stmt_init_with_options(TAOS *taos, TAOS_STMT_OPTIONS *options) {
23,945✔
249
  CHECK_PTR(fp_taos_stmt_init_with_options);
23,945✔
250
  return (*fp_taos_stmt_init_with_options)(taos, options);
23,945✔
251
}
252

253
int taos_stmt_prepare(TAOS_STMT *stmt, const char *sql, unsigned long length) {
927,560✔
254
  CHECK_INT(fp_taos_stmt_prepare);
927,560✔
255
  return (*fp_taos_stmt_prepare)(stmt, sql, length);
927,560✔
256
}
257

258
int taos_stmt_set_tbname_tags(TAOS_STMT *stmt, const char *name, TAOS_MULTI_BIND *tags) {
7,667✔
259
  CHECK_INT(fp_taos_stmt_set_tbname_tags);
7,667✔
260
  return (*fp_taos_stmt_set_tbname_tags)(stmt, name, tags);
7,667✔
261
}
262

263
int taos_stmt_set_tbname(TAOS_STMT *stmt, const char *name) {
15,306,731✔
264
  CHECK_INT(fp_taos_stmt_set_tbname);
15,306,731✔
265
  return (*fp_taos_stmt_set_tbname)(stmt, name);
15,306,731✔
266
}
267

268
int taos_stmt_set_tags(TAOS_STMT *stmt, TAOS_MULTI_BIND *tags) {
616✔
269
  CHECK_INT(fp_taos_stmt_set_tags);
616✔
270
  return (*fp_taos_stmt_set_tags)(stmt, tags);
616✔
271
}
272

273
int taos_stmt_set_sub_tbname(TAOS_STMT *stmt, const char *name) {
×
274
  CHECK_INT(fp_taos_stmt_set_sub_tbname);
×
275
  return (*fp_taos_stmt_set_sub_tbname)(stmt, name);
×
276
}
277

278
int taos_stmt_get_tag_fields(TAOS_STMT *stmt, int *fieldNum, TAOS_FIELD_E **fields) {
×
279
  CHECK_INT(fp_taos_stmt_get_tag_fields);
×
280
  return (*fp_taos_stmt_get_tag_fields)(stmt, fieldNum, fields);
×
281
}
282

283
int taos_stmt_get_col_fields(TAOS_STMT *stmt, int *fieldNum, TAOS_FIELD_E **fields) {
×
284
  CHECK_INT(fp_taos_stmt_get_col_fields);
×
285
  return (*fp_taos_stmt_get_col_fields)(stmt, fieldNum, fields);
×
286
}
287

288
void taos_stmt_reclaim_fields(TAOS_STMT *stmt, TAOS_FIELD_E *fields) {
×
289
  CHECK_VOID(fp_taos_stmt_reclaim_fields);
×
290
  (*fp_taos_stmt_reclaim_fields)(stmt, fields);
×
291
}
292

293
int taos_stmt_is_insert(TAOS_STMT *stmt, int *insert) {
×
294
  CHECK_INT(fp_taos_stmt_is_insert);
×
295
  return (*fp_taos_stmt_is_insert)(stmt, insert);
×
296
}
297

298
int taos_stmt_num_params(TAOS_STMT *stmt, int *nums) {
×
299
  CHECK_INT(fp_taos_stmt_num_params);
×
300
  return (*fp_taos_stmt_num_params)(stmt, nums);
×
301
}
302

303
int taos_stmt_get_param(TAOS_STMT *stmt, int idx, int *type, int *bytes) {
×
304
  CHECK_INT(fp_taos_stmt_get_param);
×
305
  return (*fp_taos_stmt_get_param)(stmt, idx, type, bytes);
×
306
}
307

308
int taos_stmt_bind_param(TAOS_STMT *stmt, TAOS_MULTI_BIND *bind) {
31,770✔
309
  CHECK_INT(fp_taos_stmt_bind_param);
31,770✔
310
  return (*fp_taos_stmt_bind_param)(stmt, bind);
31,770✔
311
}
312

313
int taos_stmt_bind_param_batch(TAOS_STMT *stmt, TAOS_MULTI_BIND *bind) {
523,812,817✔
314
  CHECK_INT(fp_taos_stmt_bind_param_batch);
523,812,817✔
315
  return (*fp_taos_stmt_bind_param_batch)(stmt, bind);
523,812,817✔
316
}
317

318
int taos_stmt_bind_single_param_batch(TAOS_STMT *stmt, TAOS_MULTI_BIND *bind, int colIdx) {
3,920✔
319
  CHECK_INT(fp_taos_stmt_bind_single_param_batch);
3,920✔
320
  return (*fp_taos_stmt_bind_single_param_batch)(stmt, bind, colIdx);
3,920✔
321
}
322

323
int taos_stmt_add_batch(TAOS_STMT *stmt) {
511,838,410✔
324
  CHECK_INT(fp_taos_stmt_add_batch);
511,838,410✔
325
  return (*fp_taos_stmt_add_batch)(stmt);
511,838,410✔
326
}
327

328
int taos_stmt_execute(TAOS_STMT *stmt) {
5,872,783✔
329
  CHECK_INT(fp_taos_stmt_execute);
5,872,783✔
330
  return (*fp_taos_stmt_execute)(stmt);
5,872,783✔
331
}
332

333
TAOS_RES *taos_stmt_use_result(TAOS_STMT *stmt) {
10,256✔
334
  CHECK_PTR(fp_taos_stmt_use_result);
10,256✔
335
  return (*fp_taos_stmt_use_result)(stmt);
10,256✔
336
}
337

338
int taos_stmt_close(TAOS_STMT *stmt) {
367,703✔
339
  CHECK_INT(fp_taos_stmt_close);
367,703✔
340
  return (*fp_taos_stmt_close)(stmt);
367,703✔
341
}
342

343
char *taos_stmt_errstr(TAOS_STMT *stmt) {
10,851✔
344
  CHECK_PTR(fp_taos_stmt_errstr);
10,851✔
345
  return (*fp_taos_stmt_errstr)(stmt);
10,851✔
346
}
347

348
int taos_stmt_affected_rows(TAOS_STMT *stmt) {
2,956✔
349
  CHECK_INT(fp_taos_stmt_affected_rows);
2,956✔
350
  return (*fp_taos_stmt_affected_rows)(stmt);
2,956✔
351
}
352

353
int taos_stmt_affected_rows_once(TAOS_STMT *stmt) {
280✔
354
  CHECK_INT(fp_taos_stmt_affected_rows_once);
280✔
355
  return (*fp_taos_stmt_affected_rows_once)(stmt);
280✔
356
}
357

358
TAOS_STMT2 *taos_stmt2_init(TAOS *taos, TAOS_STMT2_OPTION *option) {
23,998✔
359
  CHECK_PTR(fp_taos_stmt2_init);
23,998✔
360
  return (*fp_taos_stmt2_init)(taos, option);
23,998✔
361
}
362

363
int taos_stmt2_prepare(TAOS_STMT2 *stmt, const char *sql, unsigned long length) {
24,270✔
364
  CHECK_INT(fp_taos_stmt2_prepare);
24,270✔
365
  return (*fp_taos_stmt2_prepare)(stmt, sql, length);
24,270✔
366
}
367

368
int taos_stmt2_bind_param(TAOS_STMT2 *stmt, TAOS_STMT2_BINDV *bindv, int32_t col_idx) {
4,305,590✔
369
  CHECK_INT(fp_taos_stmt2_bind_param);
4,305,590✔
370
  return (*fp_taos_stmt2_bind_param)(stmt, bindv, col_idx);
4,305,590✔
371
}
372

373
int taos_stmt2_bind_param_a(TAOS_STMT2 *stmt, TAOS_STMT2_BINDV *bindv, int32_t col_idx, __taos_async_fn_t fp,
×
374
                            void *param) {
375
  CHECK_INT(fp_taos_stmt2_bind_param_a);
×
376
  return (*fp_taos_stmt2_bind_param_a)(stmt, bindv, col_idx, fp, param);
×
377
}
378

379
int taos_stmt2_exec(TAOS_STMT2 *stmt, int *affected_rows) {
4,306,949✔
380
  CHECK_INT(fp_taos_stmt2_exec);
4,306,949✔
381
  return (*fp_taos_stmt2_exec)(stmt, affected_rows);
4,306,949✔
382
}
383

384
int taos_stmt2_close(TAOS_STMT2 *stmt) {
23,998✔
385
  CHECK_INT(fp_taos_stmt2_close);
23,998✔
386
  return (*fp_taos_stmt2_close)(stmt);
23,998✔
387
}
388

389
int taos_stmt2_is_insert(TAOS_STMT2 *stmt, int *insert) {
110✔
390
  CHECK_INT(fp_taos_stmt2_is_insert);
110✔
391
  return (*fp_taos_stmt2_is_insert)(stmt, insert);
110✔
392
}
393

394
int taos_stmt2_get_fields(TAOS_STMT2 *stmt, int *count, TAOS_FIELD_ALL **fields) {
82✔
395
  CHECK_INT(fp_taos_stmt2_get_fields);
82✔
396
  return (*fp_taos_stmt2_get_fields)(stmt, count, fields);
82✔
397
}
398

399
void taos_stmt2_free_fields(TAOS_STMT2 *stmt, TAOS_FIELD_ALL *fields) {
82✔
400
  CHECK_VOID(fp_taos_stmt2_free_fields);
82✔
401
  (*fp_taos_stmt2_free_fields)(stmt, fields);
82✔
402
}
403

404
TAOS_RES *taos_stmt2_result(TAOS_STMT2 *stmt) {
28✔
405
  CHECK_PTR(fp_taos_stmt2_result);
28✔
406
  return (*fp_taos_stmt2_result)(stmt);
28✔
407
}
408

409
char *taos_stmt2_error(TAOS_STMT2 *stmt) {
×
410
  CHECK_PTR(fp_taos_stmt2_error);
×
411
  return (*fp_taos_stmt2_error)(stmt);
×
412
}
413

414
TAOS_RES *taos_query(TAOS *taos, const char *sql) {
650,488,578✔
415
  CHECK_PTR(fp_taos_query);
650,488,578✔
416
  return (*fp_taos_query)(taos, sql);
650,488,578✔
417
}
418

419
TAOS_RES *taos_query_with_reqid(TAOS *taos, const char *sql, int64_t reqId) {
2,547,890✔
420
  CHECK_PTR(fp_taos_query_with_reqid);
2,547,890✔
421
  return (*fp_taos_query_with_reqid)(taos, sql, reqId);
2,547,890✔
422
}
423

424
TAOS_ROW taos_fetch_row(TAOS_RES *res) {
1,606,185,534✔
425
  CHECK_PTR(fp_taos_fetch_row);
1,606,185,534✔
426
  return (*fp_taos_fetch_row)(res);
1,606,185,534✔
427
}
428

429
int taos_result_precision(TAOS_RES *res) {
93,689,344✔
430
  CHECK_INT(fp_taos_result_precision);
93,689,344✔
431
  return (*fp_taos_result_precision)(res);
93,689,344✔
432
}
433

434
void taos_free_result(TAOS_RES *res) {
653,950,561✔
435
  CHECK_VOID(fp_taos_free_result);
653,950,561✔
436
  return (*fp_taos_free_result)(res);
653,950,561✔
437
}
438

439
void taos_kill_query(TAOS *taos) {
1,196✔
440
  CHECK_VOID(fp_taos_kill_query);
1,196✔
441
  return (*fp_taos_kill_query)(taos);
1,196✔
442
}
443

444
int taos_field_count(TAOS_RES *res) {
2,147,483,647✔
445
  CHECK_INT(fp_taos_field_count);
2,147,483,647✔
446
  return (*fp_taos_field_count)(res);
2,147,483,647✔
447
}
448

449
int taos_num_fields(TAOS_RES *res) {
1,410,234,970✔
450
  CHECK_INT(fp_taos_num_fields);
1,410,234,970✔
451
  return (*fp_taos_num_fields)(res);
1,410,234,970✔
452
}
453

454
int taos_affected_rows(TAOS_RES *res) {
502,078,211✔
455
  CHECK_INT(fp_taos_affected_rows);
502,078,211✔
456
  return (*fp_taos_affected_rows)(res);
502,078,211✔
457
}
458

459
int64_t taos_affected_rows64(TAOS_RES *res) {
1,341,854✔
460
  CHECK_INT(fp_taos_affected_rows64);
1,341,854✔
461
  return (*fp_taos_affected_rows64)(res);
1,341,854✔
462
}
463

464
TAOS_FIELD *taos_fetch_fields(TAOS_RES *res) {
175,549,139✔
465
  CHECK_PTR(fp_taos_fetch_fields);
175,549,139✔
466
  return (*fp_taos_fetch_fields)(res);
175,549,139✔
467
}
468

469
TAOS_FIELD_E *taos_fetch_fields_e(TAOS_RES *res) {
1,162✔
470
  CHECK_PTR(fp_taos_fetch_fields_e);
1,162✔
471
  return (*fp_taos_fetch_fields_e)(res);
1,162✔
472
}
473

474
int taos_select_db(TAOS *taos, const char *db) {
116,827✔
475
  CHECK_INT(fp_taos_select_db);
116,827✔
476
  return (*fp_taos_select_db)(taos, db);
116,827✔
477
}
478

479
int taos_print_row(char *str, TAOS_ROW row, TAOS_FIELD *fields, int num_fields) {
79,706,950✔
480
  CHECK_INT(fp_taos_print_row);
79,706,950✔
481
  return (*fp_taos_print_row)(str, row, fields, num_fields);
79,706,950✔
482
}
483

484
int taos_print_row_with_size(char *str, uint32_t size, TAOS_ROW row, TAOS_FIELD *fields, int num_fields) {
79,759,358✔
485
  CHECK_INT(fp_taos_print_row_with_size);
79,759,358✔
486
  return (*fp_taos_print_row_with_size)(str, size, row, fields, num_fields);
79,759,358✔
487
}
488

489
void taos_stop_query(TAOS_RES *res) {
55,523,514✔
490
  CHECK_VOID(fp_taos_stop_query);
55,523,514✔
491
  (*fp_taos_stop_query)(res);
55,523,514✔
492
}
493

494
bool taos_is_null(TAOS_RES *res, int32_t row, int32_t col) {
×
495
  CHECK_BOOL(fp_taos_is_null);
×
496
  return (*fp_taos_is_null)(res, row, col);
×
497
}
498

499
int taos_is_null_by_column(TAOS_RES *res, int columnIndex, bool result[], int *rows) {
310,930,592✔
500
  CHECK_INT(fp_taos_is_null_by_column);
310,930,592✔
501
  return (*fp_taos_is_null_by_column)(res, columnIndex, result, rows);
310,930,592✔
502
}
503

504
bool taos_is_update_query(TAOS_RES *res) {
737,436✔
505
  CHECK_BOOL(fp_taos_is_update_query);
737,436✔
506
  return (*fp_taos_is_update_query)(res);
737,436✔
507
}
508

509
int taos_fetch_block(TAOS_RES *res, TAOS_ROW *rows) {
166,362,896✔
510
  CHECK_INT(fp_taos_fetch_block);
166,362,896✔
511
  return (*fp_taos_fetch_block)(res, rows);
166,362,896✔
512
}
513

514
int taos_fetch_block_s(TAOS_RES *res, int *numOfRows, TAOS_ROW *rows) {
×
515
  CHECK_INT(fp_taos_fetch_block_s);
×
516
  return (*fp_taos_fetch_block_s)(res, numOfRows, rows);
×
517
}
518

519
int taos_fetch_raw_block(TAOS_RES *res, int *numOfRows, void **pData) {
114,856✔
520
  CHECK_INT(fp_taos_fetch_raw_block);
114,856✔
521
  return (*fp_taos_fetch_raw_block)(res, numOfRows, pData);
114,856✔
522
}
523

524
int *taos_get_column_data_offset(TAOS_RES *res, int columnIndex) {
111,255,979✔
525
  CHECK_PTR(fp_taos_get_column_data_offset);
111,255,979✔
526
  return (*fp_taos_get_column_data_offset)(res, columnIndex);
111,255,979✔
527
}
528

529
int taos_validate_sql(TAOS *taos, const char *sql) {
×
530
  CHECK_INT(fp_taos_validate_sql);
×
531
  return (*fp_taos_validate_sql)(taos, sql);
×
532
}
533

534
void taos_reset_current_db(TAOS *taos) {
×
535
  CHECK_VOID(fp_taos_reset_current_db);
×
536
  (*fp_taos_reset_current_db)(taos);
×
537
}
538

539
int *taos_fetch_lengths(TAOS_RES *res) {
1,517,378,440✔
540
  CHECK_PTR(fp_taos_fetch_lengths);
1,517,378,440✔
541
  return (*fp_taos_fetch_lengths)(res);
1,517,378,440✔
542
}
543

544
TAOS_ROW *taos_result_block(TAOS_RES *res) {
×
545
  CHECK_PTR(fp_taos_result_block);
×
546
  return (*fp_taos_result_block)(res);
×
547
}
548

549
const char *taos_get_server_info(TAOS *taos) {
48,650✔
550
  CHECK_PTR(fp_taos_get_server_info);
48,650✔
551
  return (*fp_taos_get_server_info)(taos);
48,650✔
552
}
553

554
const char *taos_get_client_info() {
1,447,574✔
555
  if (fp_taos_get_client_info == NULL) {
1,447,574✔
556
    return td_version;
624,567✔
557
  } else {
558
    return (*fp_taos_get_client_info)();
823,007✔
559
  }
560
}
561

562
int taos_get_current_db(TAOS *taos, char *database, int len, int *required) {
×
563
  CHECK_INT(fp_taos_get_current_db);
×
564
  return (*fp_taos_get_current_db)(taos, database, len, required);
×
565
}
566

567
const char *taos_errstr(TAOS_RES *res) {
21,997,220✔
568
  (void)taos_init();
21,997,220✔
569
  if (fp_taos_errstr == NULL) {
21,997,220✔
570
    return tstrerror(terrno);
×
571
  }
572
  return (*fp_taos_errstr)(res);
21,997,220✔
573
}
574

575
int taos_errno(TAOS_RES *res) {
820,904,108✔
576
  (void)taos_init();
820,904,108✔
577
  if (fp_taos_errno == NULL) {
820,900,407✔
578
    return terrno;
×
579
  }
580
  return (*fp_taos_errno)(res);
820,900,407✔
581
}
582

583
void taos_query_a(TAOS *taos, const char *sql, __taos_async_fn_t fp, void *param) {
4,088✔
584
  CHECK_VOID(fp_taos_query_a);
4,088✔
585
  (*fp_taos_query_a)(taos, sql, fp, param);
4,088✔
586
}
587

588
void taos_query_a_with_reqid(TAOS *taos, const char *sql, __taos_async_fn_t fp, void *param, int64_t reqid) {
×
589
  CHECK_VOID(fp_taos_query_a_with_reqid);
×
590
  (*fp_taos_query_a_with_reqid)(taos, sql, fp, param, reqid);
×
591
}
592

593
void taos_fetch_rows_a(TAOS_RES *res, __taos_async_fn_t fp, void *param) {
11,691,166✔
594
  CHECK_VOID(fp_taos_fetch_rows_a);
11,691,166✔
595
  (*fp_taos_fetch_rows_a)(res, fp, param);
11,691,166✔
596
}
597

598
void taos_fetch_raw_block_a(TAOS_RES *res, __taos_async_fn_t fp, void *param) {
476✔
599
  CHECK_VOID(fp_taos_fetch_raw_block_a);
476✔
600
  (*fp_taos_fetch_raw_block_a)(res, fp, param);
476✔
601
}
602

603
const void *taos_get_raw_block(TAOS_RES *res) {
280✔
604
  CHECK_PTR(fp_taos_get_raw_block);
280✔
605
  return (*fp_taos_get_raw_block)(res);
280✔
606
}
607

608
int taos_get_db_route_info(TAOS *taos, const char *db, TAOS_DB_ROUTE_INFO *dbInfo) {
×
609
  CHECK_INT(fp_taos_get_db_route_info);
×
610
  return (*fp_taos_get_db_route_info)(taos, db, dbInfo);
×
611
}
612

613
int taos_get_table_vgId(TAOS *taos, const char *db, const char *table, int *vgId) {
×
614
  CHECK_INT(fp_taos_get_table_vgId);
×
615
  return (*fp_taos_get_table_vgId)(taos, db, table, vgId);
×
616
}
617

618
int taos_get_tables_vgId(TAOS *taos, const char *db, const char *table[], int tableNum, int *vgId) {
×
619
  CHECK_INT(fp_taos_get_tables_vgId);
×
620
  return (*fp_taos_get_tables_vgId)(taos, db, table, tableNum, vgId);
×
621
}
622

623
int taos_load_table_info(TAOS *taos, const char *tableNameList) {
1,282✔
624
  CHECK_INT(fp_taos_load_table_info);
1,282✔
625
  return (*fp_taos_load_table_info)(taos, tableNameList);
1,282✔
626
}
627

628
void taos_set_hb_quit(int8_t quitByKill) {
823,323✔
629
  if (taos_init() != 0) {
823,323✔
630
    return;
×
631
  }
632

633
  CHECK_VOID(fp_taos_set_hb_quit);
823,323✔
634
  return (*fp_taos_set_hb_quit)(quitByKill);
823,323✔
635
}
636

637
int taos_set_notify_cb(TAOS *taos, __taos_notify_fn_t fp, void *param, int type) {
2,660✔
638
  CHECK_INT(fp_taos_set_notify_cb);
2,660✔
639
  return (*fp_taos_set_notify_cb)(taos, fp, param, type);
2,660✔
640
}
641

642
void taos_fetch_whitelist_a(TAOS *taos, __taos_async_whitelist_fn_t fp, void *param) {
×
643
  CHECK_VOID(fp_taos_fetch_whitelist_a);
×
644
  return (*fp_taos_fetch_whitelist_a)(taos, fp, param);
×
645
}
646

647
void taos_fetch_whitelist_dual_stack_a(TAOS *taos, __taos_async_whitelist_dual_stack_fn_t fp, void *param) {
×
648
  CHECK_VOID(fp_taos_fetch_whitelist_dual_stack_a);
×
649
  return (*fp_taos_fetch_whitelist_dual_stack_a)(taos, fp, param);
×
650
}
651

652
void taos_fetch_ip_whitelist_a(TAOS *taos, __taos_async_ip_whitelist_fn_t fp, void *param) {
×
653
  CHECK_VOID(fp_taos_fetch_ip_whitelist_a);
×
654
  return (*fp_taos_fetch_ip_whitelist_a)(taos, fp, param);
×
655
}
656

657
void taos_fetch_datetime_whitelist_a(TAOS *taos, __taos_async_datetime_whitelist_fn_t fp, void *param) {
×
658
  CHECK_VOID(fp_taos_fetch_datetime_whitelist_a);
×
659
  return (*fp_taos_fetch_datetime_whitelist_a)(taos, fp, param);
×
660
}
661

662
int taos_set_conn_mode(TAOS *taos, int mode, int value) {
2,648✔
663
  CHECK_INT(fp_taos_set_conn_mode);
2,648✔
664
  return (*fp_taos_set_conn_mode)(taos, mode, value);
2,648✔
665
}
666

667
TAOS_RES *taos_schemaless_insert(TAOS *taos, char *lines[], int numLines, int protocol, int precision) {
558,360✔
668
  CHECK_PTR(fp_taos_schemaless_insert);
558,360✔
669
  return (*fp_taos_schemaless_insert)(taos, lines, numLines, protocol, precision);
558,360✔
670
}
671

672
TAOS_RES *taos_schemaless_insert_with_reqid(TAOS *taos, char *lines[], int numLines, int protocol, int precision,
×
673
                                            int64_t reqid) {
674
  CHECK_PTR(fp_taos_schemaless_insert_with_reqid);
×
675
  return (*fp_taos_schemaless_insert_with_reqid)(taos, lines, numLines, protocol, precision, reqid);
×
676
}
677

678
TAOS_RES *taos_schemaless_insert_raw(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol,
84✔
679
                                     int precision) {
680
  CHECK_PTR(fp_taos_schemaless_insert_raw);
84✔
681
  return (*fp_taos_schemaless_insert_raw)(taos, lines, len, totalRows, protocol, precision);
84✔
682
}
683

684
TAOS_RES *taos_schemaless_insert_raw_with_reqid(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol,
112✔
685
                                                int precision, int64_t reqid) {
686
  CHECK_PTR(fp_taos_schemaless_insert_raw_with_reqid);
112✔
687
  return (*fp_taos_schemaless_insert_raw_with_reqid)(taos, lines, len, totalRows, protocol, precision, reqid);
112✔
688
}
689

690
TAOS_RES *taos_schemaless_insert_ttl(TAOS *taos, char *lines[], int numLines, int protocol, int precision,
×
691
                                     int32_t ttl) {
692
  CHECK_PTR(fp_taos_schemaless_insert_ttl);
×
693
  return (*fp_taos_schemaless_insert_ttl)(taos, lines, numLines, protocol, precision, ttl);
×
694
}
695

696
TAOS_RES *taos_schemaless_insert_ttl_with_reqid(TAOS *taos, char *lines[], int numLines, int protocol, int precision,
111,385✔
697
                                                int32_t ttl, int64_t reqid) {
698
  CHECK_PTR(fp_taos_schemaless_insert_ttl_with_reqid);
111,385✔
699
  return (*fp_taos_schemaless_insert_ttl_with_reqid)(taos, lines, numLines, protocol, precision, ttl, reqid);
111,385✔
700
}
701

702
TAOS_RES *taos_schemaless_insert_raw_ttl(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol,
×
703
                                         int precision, int32_t ttl) {
704
  CHECK_PTR(fp_taos_schemaless_insert_raw_ttl);
×
705
  return (*fp_taos_schemaless_insert_raw_ttl)(taos, lines, len, totalRows, protocol, precision, ttl);
×
706
}
707

708
TAOS_RES *taos_schemaless_insert_raw_ttl_with_reqid(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol,
364✔
709
                                                    int precision, int32_t ttl, int64_t reqid) {
710
  CHECK_PTR(fp_taos_schemaless_insert_raw_ttl_with_reqid);
364✔
711
  return (*fp_taos_schemaless_insert_raw_ttl_with_reqid)(taos, lines, len, totalRows, protocol, precision, ttl, reqid);
364✔
712
}
713

714
TAOS_RES *taos_schemaless_insert_raw_ttl_with_reqid_tbname_key(TAOS *taos, char *lines, int len, int32_t *totalRows,
×
715
                                                               int protocol, int precision, int32_t ttl, int64_t reqid,
716
                                                               char *tbnameKey) {
717
  CHECK_PTR(fp_taos_schemaless_insert_raw_ttl_with_reqid_tbname_key);
×
718
  return (*fp_taos_schemaless_insert_raw_ttl_with_reqid_tbname_key)(taos, lines, len, totalRows, protocol, precision,
×
719
                                                                    ttl, reqid, tbnameKey);
720
}
721

722
TAOS_RES *taos_schemaless_insert_ttl_with_reqid_tbname_key(TAOS *taos, char *lines[], int numLines, int protocol,
111,385✔
723
                                                           int precision, int32_t ttl, int64_t reqid, char *tbnameKey) {
724
  CHECK_PTR(fp_taos_schemaless_insert_ttl_with_reqid_tbname_key);
111,385✔
725
  return (*fp_taos_schemaless_insert_ttl_with_reqid_tbname_key)(taos, lines, numLines, protocol, precision, ttl, reqid,
111,385✔
726
                                                                tbnameKey);
727
}
728

729
tmq_conf_t *tmq_conf_new() {
14,740✔
730
  (void)taos_init();
14,740✔
731
  CHECK_PTR(fp_tmq_conf_new);
14,740✔
732
  return (*fp_tmq_conf_new)();
14,740✔
733
}
734

735
tmq_conf_res_t tmq_conf_set(tmq_conf_t *conf, const char *key, const char *value) {
93,932✔
736
  CHECK_INT(fp_tmq_conf_set);
93,932✔
737
  return (*fp_tmq_conf_set)(conf, key, value);
93,932✔
738
}
739

740
void tmq_conf_destroy(tmq_conf_t *conf) {
14,740✔
741
  CHECK_VOID(fp_tmq_conf_destroy);
14,740✔
742
  (*fp_tmq_conf_destroy)(conf);
14,740✔
743
}
744

745
void tmq_conf_set_auto_commit_cb(tmq_conf_t *conf, tmq_commit_cb *cb, void *param) {
214✔
746
  CHECK_VOID(fp_tmq_conf_set_auto_commit_cb);
214✔
747
  (*fp_tmq_conf_set_auto_commit_cb)(conf, cb, param);
214✔
748
}
749

750
tmq_list_t *tmq_list_new() {
17,291✔
751
  (void)taos_init();
17,291✔
752
  CHECK_PTR(fp_tmq_list_new);
17,291✔
753
  return (*fp_tmq_list_new)();
17,291✔
754
}
755

756
int32_t tmq_list_append(tmq_list_t *tlist, const char *val) {
15,296✔
757
  CHECK_INT(fp_tmq_list_append);
15,296✔
758
  return (*fp_tmq_list_append)(tlist, val);
15,296✔
759
}
760

761
void tmq_list_destroy(tmq_list_t *tlist) {
17,319✔
762
  CHECK_VOID(fp_tmq_list_destroy);
17,319✔
763
  (*fp_tmq_list_destroy)(tlist);
17,319✔
764
}
765

766
int32_t tmq_list_get_size(const tmq_list_t *tlist) {
627✔
767
  CHECK_INT(fp_tmq_list_get_size);
627✔
768
  return (*fp_tmq_list_get_size)(tlist);
627✔
769
}
770

771
char **tmq_list_to_c_array(const tmq_list_t *tlist) {
627✔
772
  CHECK_PTR(fp_tmq_list_to_c_array);
627✔
773
  return (*fp_tmq_list_to_c_array)(tlist);
627✔
774
}
775

776
tmq_t *tmq_consumer_new(tmq_conf_t *conf, char *errstr, int32_t errstrLen) {
14,482✔
777
  (void)taos_init();
14,482✔
778
  CHECK_PTR(fp_tmq_consumer_new);
14,482✔
779
  return (*fp_tmq_consumer_new)(conf, errstr, errstrLen);
14,482✔
780
}
781

782
int32_t tmq_subscribe(tmq_t *tmq, const tmq_list_t *topic_list) {
16,692✔
783
  CHECK_INT(fp_tmq_subscribe);
16,692✔
784
  return (*fp_tmq_subscribe)(tmq, topic_list);
16,692✔
785
}
786

787
int32_t tmq_unsubscribe(tmq_t *tmq) {
9,967✔
788
  CHECK_INT(fp_tmq_unsubscribe);
9,967✔
789
  return (*fp_tmq_unsubscribe)(tmq);
9,967✔
790
}
791

792
int32_t tmq_subscription(tmq_t *tmq, tmq_list_t **topics) {
627✔
793
  CHECK_INT(fp_tmq_subscription);
627✔
794
  return (*fp_tmq_subscription)(tmq, topics);
627✔
795
}
796

797
TAOS_RES *tmq_consumer_poll(tmq_t *tmq, int64_t timeout) {
299,263✔
798
  CHECK_PTR(fp_tmq_consumer_poll);
299,263✔
799
  return (*fp_tmq_consumer_poll)(tmq, timeout);
299,263✔
800
}
801

802
int32_t tmq_consumer_close(tmq_t *tmq) {
14,944✔
803
  CHECK_INT(fp_tmq_consumer_close);
14,944✔
804
  return (*fp_tmq_consumer_close)(tmq);
14,944✔
805
}
806

807
int32_t tmq_commit_sync(tmq_t *tmq, const TAOS_RES *msg) {
5,317✔
808
  CHECK_INT(fp_tmq_commit_sync);
5,317✔
809
  return (*fp_tmq_commit_sync)(tmq, msg);
5,317✔
810
}
811

812
void tmq_commit_async(tmq_t *tmq, const TAOS_RES *msg, tmq_commit_cb *cb, void *param) {
×
813
  CHECK_VOID(fp_tmq_commit_async);
×
814
  (*fp_tmq_commit_async)(tmq, msg, cb, param);
×
815
}
816

817
int32_t tmq_commit_offset_sync(tmq_t *tmq, const char *pTopicName, int32_t vgId, int64_t offset) {
452✔
818
  CHECK_INT(fp_tmq_commit_offset_sync);
452✔
819
  return (*fp_tmq_commit_offset_sync)(tmq, pTopicName, vgId, offset);
452✔
820
}
821

822
void tmq_commit_offset_async(tmq_t *tmq, const char *pTopicName, int32_t vgId, int64_t offset, tmq_commit_cb *cb,
×
823
                             void *param) {
824
  CHECK_VOID(fp_tmq_commit_offset_async);
×
825
  (*fp_tmq_commit_offset_async)(tmq, pTopicName, vgId, offset, cb, param);
×
826
}
827

828
int32_t tmq_get_topic_assignment(tmq_t *tmq, const char *pTopicName, tmq_topic_assignment **assignment,
739✔
829
                                 int32_t *numOfAssignment) {
830
  CHECK_INT(fp_tmq_get_topic_assignment);
739✔
831
  return (*fp_tmq_get_topic_assignment)(tmq, pTopicName, assignment, numOfAssignment);
739✔
832
}
833

834
void tmq_free_assignment(tmq_topic_assignment *pAssignment) {
571✔
835
  CHECK_VOID(fp_tmq_free_assignment);
571✔
836
  (*fp_tmq_free_assignment)(pAssignment);
571✔
837
}
838

839
int32_t tmq_offset_seek(tmq_t *tmq, const char *pTopicName, int32_t vgId, int64_t offset) {
891✔
840
  CHECK_INT(fp_tmq_offset_seek);
891✔
841
  return (*fp_tmq_offset_seek)(tmq, pTopicName, vgId, offset);
891✔
842
}
843

844
int64_t tmq_position(tmq_t *tmq, const char *pTopicName, int32_t vgId) {
636✔
845
  CHECK_INT(fp_tmq_position);
636✔
846
  return (*fp_tmq_position)(tmq, pTopicName, vgId);
636✔
847
}
848

849
int64_t tmq_committed(tmq_t *tmq, const char *pTopicName, int32_t vgId) {
742✔
850
  CHECK_INT(fp_tmq_committed);
742✔
851
  return (*fp_tmq_committed)(tmq, pTopicName, vgId);
742✔
852
}
853

854
TAOS *tmq_get_connect(tmq_t *tmq) {
×
855
  CHECK_PTR(fp_tmq_get_connect);
×
856
  return (*fp_tmq_get_connect)(tmq);
×
857
}
858

859
const char *tmq_get_table_name(TAOS_RES *res) {
80,739,511✔
860
  CHECK_PTR(fp_tmq_get_table_name);
80,739,511✔
861
  return (*fp_tmq_get_table_name)(res);
80,739,511✔
862
}
863

864
tmq_res_t tmq_get_res_type(TAOS_RES *res) {
267,033✔
865
  CHECK_INT(fp_tmq_get_res_type);
267,033✔
866
  return (*fp_tmq_get_res_type)(res);
267,033✔
867
}
868

869
const char *tmq_get_topic_name(TAOS_RES *res) {
16,656✔
870
  CHECK_PTR(fp_tmq_get_topic_name);
16,656✔
871
  return (*fp_tmq_get_topic_name)(res);
16,656✔
872
}
873

874
const char *tmq_get_db_name(TAOS_RES *res) {
15,424✔
875
  CHECK_PTR(fp_tmq_get_db_name);
15,424✔
876
  return (*fp_tmq_get_db_name)(res);
15,424✔
877
}
878

879
int32_t tmq_get_vgroup_id(TAOS_RES *res) {
16,656✔
880
  CHECK_INT(fp_tmq_get_vgroup_id);
16,656✔
881
  return (*fp_tmq_get_vgroup_id)(res);
16,656✔
882
}
883

884
int64_t tmq_get_vgroup_offset(TAOS_RES *res) {
192,198✔
885
  CHECK_INT(fp_tmq_get_vgroup_offset);
192,198✔
886
  return (*fp_tmq_get_vgroup_offset)(res);
192,198✔
887
}
888

889
const char *tmq_err2str(int32_t code) {
1,114✔
890
  CHECK_PTR(fp_tmq_err2str);
1,114✔
891
  return (*fp_tmq_err2str)(code);
1,114✔
892
}
893

894
int32_t tmq_get_raw(TAOS_RES *res, tmq_raw_data *raw) {
168✔
895
  CHECK_INT(fp_tmq_get_raw);
168✔
896
  return (*fp_tmq_get_raw)(res, raw);
168✔
897
}
898

899
int32_t tmq_write_raw(TAOS *taos, tmq_raw_data raw) {
×
900
  CHECK_INT(fp_tmq_write_raw);
×
901
  return (*fp_tmq_write_raw)(taos, raw);
×
902
}
903

904
int taos_write_raw_block(TAOS *taos, int numOfRows, char *pData, const char *tbname) {
×
905
  CHECK_INT(fp_taos_write_raw_block);
×
906
  return (*fp_taos_write_raw_block)(taos, numOfRows, pData, tbname);
×
907
}
908

909
int taos_write_raw_block_with_reqid(TAOS *taos, int numOfRows, char *pData, const char *tbname, int64_t reqid) {
×
910
  CHECK_INT(fp_taos_write_raw_block_with_reqid);
×
911
  return (*fp_taos_write_raw_block_with_reqid)(taos, numOfRows, pData, tbname, reqid);
×
912
}
913

914
int taos_write_raw_block_with_fields(TAOS *taos, int rows, char *pData, const char *tbname, TAOS_FIELD *fields,
×
915
                                     int numFields) {
916
  CHECK_INT(fp_taos_write_raw_block_with_fields);
×
917
  return (*fp_taos_write_raw_block_with_fields)(taos, rows, pData, tbname, fields, numFields);
×
918
}
919

920
int taos_write_raw_block_with_fields_with_reqid(TAOS *taos, int rows, char *pData, const char *tbname,
×
921
                                                TAOS_FIELD *fields, int numFields, int64_t reqid) {
922
  CHECK_INT(fp_taos_write_raw_block_with_fields_with_reqid);
×
923
  return (*fp_taos_write_raw_block_with_fields_with_reqid)(taos, rows, pData, tbname, fields, numFields, reqid);
×
924
}
925

926
void tmq_free_raw(tmq_raw_data raw) {
×
927
  CHECK_VOID(fp_tmq_free_raw);
×
928
  (*fp_tmq_free_raw)(raw);
×
929
}
930

931
char *tmq_get_json_meta(TAOS_RES *res) {
380✔
932
  CHECK_PTR(fp_tmq_get_json_meta);
380✔
933
  return (*fp_tmq_get_json_meta)(res);
380✔
934
}
935

936
void tmq_free_json_meta(char *jsonMeta) {
380✔
937
  CHECK_VOID(fp_tmq_free_json_meta);
380✔
938
  return (*fp_tmq_free_json_meta)(jsonMeta);
380✔
939
}
940

941
TSDB_SERVER_STATUS taos_check_server_status(const char *fqdn, int port, char *details, int maxlen) {
540✔
942
  CHECK_INT(fp_taos_check_server_status);
540✔
943
  return (*fp_taos_check_server_status)(fqdn, port, details, maxlen);
540✔
944
}
945

946
void taos_write_crashinfo(int signum, void *sigInfo, void *context) {
×
947
  (void)taos_init();
×
948
  CHECK_VOID(fp_taos_write_crashinfo);
×
949
  (*fp_taos_write_crashinfo)(signum, sigInfo, context);
×
950
}
951

952
char *getBuildInfo() {
×
953
  (void)taos_init();
×
954
  CHECK_PTR(fp_getBuildInfo);
×
955
  return (*fp_getBuildInfo)();
×
956
}
957

958
// int32_t taos_connect_is_alive(TAOS *taos) {
959
//   CHECK_INT(fp_taos_connect_is_alive);
960
//   return (*fp_taos_connect_is_alive)(taos);
961
// }
962

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc