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

taosdata / TDengine / #4950

06 Feb 2026 07:29AM UTC coverage: 66.849% (-0.1%) from 66.973%
#4950

push

travis-ci

web-flow
merge: from main to 3.0 #34521

759 of 1081 new or added lines in 28 files covered. (70.21%)

1144 existing lines in 130 files now uncovered.

205692 of 307696 relevant lines covered (66.85%)

127112954.87 hits per line

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

68.44
/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 tsDriverEnvOnce = PTHREAD_ONCE_INIT;
20
static TdThreadOnce tsDriverOnce = PTHREAD_ONCE_INIT;
21
volatile int32_t    tsDriverOnceRet = 0;
22

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

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

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

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

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

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

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

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

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

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

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

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

92
  CHECK_CONFRET(fp_taos_set_config);
16✔
93
  return (*fp_taos_set_config)(config);
16✔
94
}
95

96
static void taos_init_driver_env(void) {
1,202,506✔
97
  taosDriverEnvInit();
1,202,506✔
98
}
1,202,506✔
99

100
static void taos_init_driver(void) {
1,201,538✔
101
  tsDriverOnceRet = taosDriverInit(tsDriverType);
1,201,538✔
102
  if (tsDriverOnceRet != 0) return;
1,201,538✔
103

104
  tsDriverOnceRet = 0;
1,201,538✔
105
}
106

107
static void taos_init_wrapper(void) {
1,201,381✔
108
  if (fp_taos_init == NULL) {
1,201,381✔
109
    terrno = TSDB_CODE_DLL_FUNC_NOT_LOAD;
×
110
    tsInitOnceRet = -1;
×
111
  } else {
112
    tsInitOnceRet = (*fp_taos_init)();
1,201,381✔
113
  }
114
}
1,201,381✔
115

116
int taos_init(void) {
1,191,532,623✔
117
  (void)taosThreadOnce(&tsDriverEnvOnce, taos_init_driver_env);
1,191,532,623✔
118
  (void)taosThreadOnce(&tsDriverOnce, taos_init_driver);
1,191,537,792✔
119
  (void)taosThreadOnce(&tsInitOnce, taos_init_wrapper);
1,191,536,310✔
120
  return tsInitOnceRet;
1,191,534,258✔
121
}
122

123
void taos_cleanup(void) {
905,423✔
124
  CHECK_VOID(fp_taos_cleanup);
905,423✔
125
  (*fp_taos_cleanup)();
905,423✔
126
}
127

128
int taos_options(TSDB_OPTION option, const void *arg, ...) {
1,525,376✔
129
  (void)taosThreadOnce(&tsDriverEnvOnce, taos_init_driver_env);
1,525,376✔
130
  if (option == TSDB_OPTION_DRIVER) {
1,525,376✔
131
    if (tsDriver == NULL) {
907,457✔
132
      if (strcasecmp((const char *)arg, STR_NATIVE) == 0) {
907,457✔
133
        tsDriverType = DRIVER_NATIVE;
904,447✔
134
        return 0;
904,447✔
135
      }
136
      if (strcasecmp((const char *)arg, STR_WEBSOCKET) == 0) {
3,010✔
137
        tsDriverType = DRIVER_WEBSOCKET;
3,010✔
138
        return 0;
3,010✔
139
      }
140
    }
141
    terrno = TSDB_CODE_REPEAT_INIT;
×
142
    return -1;
×
143
  }
144
  (void)taosThreadOnce(&tsDriverOnce, taos_init_driver);
617,919✔
145

146
  CHECK_INT(fp_taos_options);
617,919✔
147
  return (*fp_taos_options)(option, arg);
617,919✔
148
}
149

150
int taos_options_connection(TAOS *taos, TSDB_OPTION_CONNECTION option, const void *arg, ...) {
×
151
  CHECK_INT(fp_taos_options_connection);
×
152
  return (*fp_taos_options_connection)(taos, option, (const char *)arg);
×
153
}
154

155
TAOS *taos_connect(const char *ip, const char *user, const char *pass, const char *db, uint16_t port) {
2,104,790✔
156
  if (taos_init() != 0) {
2,104,790✔
157
    //terrno = TSDB_CODE_DLL_NOT_LOAD;
158
    return NULL;
×
159
  }
160

161
  CHECK_PTR(fp_taos_connect);
2,104,775✔
162
  return (*fp_taos_connect)(ip, user, pass, db, port);
2,104,775✔
163
}
164

165
TAOS *taos_connect_totp(const char *ip, const char *user, const char *pass, const char* totp, const char *db, uint16_t port) {
1,960✔
166
  if (taos_init() != 0) {
1,960✔
167
    terrno = TSDB_CODE_DLL_NOT_LOAD;
×
168
    return NULL;
×
169
  }
170

171
  CHECK_PTR(fp_taos_connect_totp);
1,960✔
172
  return (*fp_taos_connect_totp)(ip, user, pass, totp, db, port);
1,960✔
173
}
174

175
int taos_connect_test(const char *ip, const char *user, const char *pass, const char* totp, const char *db, uint16_t port) {
×
176
  if (taos_init() != 0) {
×
177
    return TSDB_CODE_DLL_NOT_LOAD;
×
178
  }
179
  if (tsDriver == NULL) {
×
180
    return TSDB_CODE_DLL_NOT_LOAD;
×
181
  }
182
  if (fp_taos_connect_test == NULL) {
×
183
    return TSDB_CODE_DLL_FUNC_NOT_LOAD;
×
184
  }
185
  return (*fp_taos_connect_test)(ip, user, pass, totp, db, port);
×
186
}
187

188
TAOS *taos_connect_token(const char *ip, const char *token, const char *db, uint16_t port) {
2,343✔
189
  if (taos_init() != 0) {
2,343✔
190
    terrno = TSDB_CODE_DLL_NOT_LOAD;
×
191
    return NULL;
×
192
  }
193

194
  CHECK_PTR(fp_taos_connect_token);
2,343✔
195
  return (*fp_taos_connect_token)(ip, token, db, port);
2,343✔
196
}
197

198
TAOS *taos_connect_auth(const char *ip, const char *user, const char *auth, const char *db, uint16_t port) {
151✔
199
  if (taos_init() != 0) {
151✔
200
    terrno = TSDB_CODE_DLL_NOT_LOAD;
×
201
    return NULL;
×
202
  }
203

204
  CHECK_PTR(fp_taos_connect_auth);
151✔
205
  return (*fp_taos_connect_auth)(ip, user, auth, db, port);
151✔
206
}
207

208
void taos_set_option(OPTIONS *options, const char *key, const char *value) {
×
209
  if (taos_init() != 0) {
×
210
    return;
×
211
  }
212

213
  CHECK_VOID(fp_taos_set_option);
×
214
  (*fp_taos_set_option)(options, key, value);
×
215
}
216

217
TAOS *taos_connect_with(const OPTIONS *options) {
×
218
  if (taos_init() != 0) {
×
219
    return NULL;
×
220
  }
221

222
  CHECK_PTR(fp_taos_connect_with);
×
223
  return (*fp_taos_connect_with)(options);
×
224
}
225

226
TAOS *taos_connect_with_dsn(const char *dsn) {
1,092✔
227
  if (taos_init() != 0) {
1,092✔
228
    return NULL;
×
229
  }
230

231
  CHECK_PTR(fp_taos_connect_with_dsn);
1,092✔
232
  return (*fp_taos_connect_with_dsn)(dsn);
1,092✔
233
}
234

235
void taos_close(TAOS *taos) {
2,096,685✔
236
  CHECK_VOID(fp_taos_close);
2,096,685✔
237
  (*fp_taos_close)(taos);
2,096,685✔
238
}
239

240
const char *taos_data_type(int type) {
×
241
  (void)taos_init();
×
242
  CHECK_PTR(fp_taos_data_type);
×
243
  return (*fp_taos_data_type)(type);
×
244
}
245

246
TAOS_STMT *taos_stmt_init(TAOS *taos) {
127,046✔
247
  CHECK_PTR(fp_taos_stmt_init);
127,046✔
248
  return (*fp_taos_stmt_init)(taos);
127,046✔
249
}
250

251
TAOS_STMT *taos_stmt_init_with_reqid(TAOS *taos, int64_t reqid) {
915✔
252
  CHECK_PTR(fp_taos_stmt_init_with_reqid);
915✔
253
  return (*fp_taos_stmt_init_with_reqid)(taos, reqid);
915✔
254
}
255

256
TAOS_STMT *taos_stmt_init_with_options(TAOS *taos, TAOS_STMT_OPTIONS *options) {
12,436✔
257
  CHECK_PTR(fp_taos_stmt_init_with_options);
12,436✔
258
  return (*fp_taos_stmt_init_with_options)(taos, options);
12,436✔
259
}
260

261
int taos_stmt_prepare(TAOS_STMT *stmt, const char *sql, unsigned long length) {
6,621,691✔
262
  CHECK_INT(fp_taos_stmt_prepare);
6,621,691✔
263
  return (*fp_taos_stmt_prepare)(stmt, sql, length);
6,621,691✔
264
}
265

266
int taos_stmt_set_tbname_tags(TAOS_STMT *stmt, const char *name, TAOS_MULTI_BIND *tags) {
5,968✔
267
  CHECK_INT(fp_taos_stmt_set_tbname_tags);
5,968✔
268
  return (*fp_taos_stmt_set_tbname_tags)(stmt, name, tags);
5,968✔
269
}
270

271
int taos_stmt_set_tbname(TAOS_STMT *stmt, const char *name) {
8,732,287✔
272
  CHECK_INT(fp_taos_stmt_set_tbname);
8,732,287✔
273
  return (*fp_taos_stmt_set_tbname)(stmt, name);
8,732,287✔
274
}
275

276
int taos_stmt_set_tags(TAOS_STMT *stmt, TAOS_MULTI_BIND *tags) {
198✔
277
  CHECK_INT(fp_taos_stmt_set_tags);
198✔
278
  return (*fp_taos_stmt_set_tags)(stmt, tags);
198✔
279
}
280

281
int taos_stmt_set_sub_tbname(TAOS_STMT *stmt, const char *name) {
×
282
  CHECK_INT(fp_taos_stmt_set_sub_tbname);
×
283
  return (*fp_taos_stmt_set_sub_tbname)(stmt, name);
×
284
}
285

286
int taos_stmt_get_tag_fields(TAOS_STMT *stmt, int *fieldNum, TAOS_FIELD_E **fields) {
×
287
  CHECK_INT(fp_taos_stmt_get_tag_fields);
×
288
  return (*fp_taos_stmt_get_tag_fields)(stmt, fieldNum, fields);
×
289
}
290

291
int taos_stmt_get_col_fields(TAOS_STMT *stmt, int *fieldNum, TAOS_FIELD_E **fields) {
×
292
  CHECK_INT(fp_taos_stmt_get_col_fields);
×
293
  return (*fp_taos_stmt_get_col_fields)(stmt, fieldNum, fields);
×
294
}
295

296
void taos_stmt_reclaim_fields(TAOS_STMT *stmt, TAOS_FIELD_E *fields) {
×
297
  CHECK_VOID(fp_taos_stmt_reclaim_fields);
×
298
  (*fp_taos_stmt_reclaim_fields)(stmt, fields);
×
299
}
300

301
int taos_stmt_is_insert(TAOS_STMT *stmt, int *insert) {
×
302
  CHECK_INT(fp_taos_stmt_is_insert);
×
303
  return (*fp_taos_stmt_is_insert)(stmt, insert);
×
304
}
305

306
int taos_stmt_num_params(TAOS_STMT *stmt, int *nums) {
×
307
  CHECK_INT(fp_taos_stmt_num_params);
×
308
  return (*fp_taos_stmt_num_params)(stmt, nums);
×
309
}
310

311
int taos_stmt_get_param(TAOS_STMT *stmt, int idx, int *type, int *bytes) {
×
312
  CHECK_INT(fp_taos_stmt_get_param);
×
313
  return (*fp_taos_stmt_get_param)(stmt, idx, type, bytes);
×
314
}
315

316
int taos_stmt_bind_param(TAOS_STMT *stmt, TAOS_MULTI_BIND *bind) {
27,122✔
317
  CHECK_INT(fp_taos_stmt_bind_param);
27,122✔
318
  return (*fp_taos_stmt_bind_param)(stmt, bind);
27,122✔
319
}
320

321
int taos_stmt_bind_param_batch(TAOS_STMT *stmt, TAOS_MULTI_BIND *bind) {
58,068,753✔
322
  CHECK_INT(fp_taos_stmt_bind_param_batch);
58,068,753✔
323
  return (*fp_taos_stmt_bind_param_batch)(stmt, bind);
58,068,753✔
324
}
325

326
int taos_stmt_bind_single_param_batch(TAOS_STMT *stmt, TAOS_MULTI_BIND *bind, int colIdx) {
980✔
327
  CHECK_INT(fp_taos_stmt_bind_single_param_batch);
980✔
328
  return (*fp_taos_stmt_bind_single_param_batch)(stmt, bind, colIdx);
980✔
329
}
330

331
int taos_stmt_add_batch(TAOS_STMT *stmt) {
55,830,816✔
332
  CHECK_INT(fp_taos_stmt_add_batch);
55,830,816✔
333
  return (*fp_taos_stmt_add_batch)(stmt);
55,830,816✔
334
}
335

336
int taos_stmt_execute(TAOS_STMT *stmt) {
7,259,199✔
337
  CHECK_INT(fp_taos_stmt_execute);
7,259,199✔
338
  return (*fp_taos_stmt_execute)(stmt);
7,259,199✔
339
}
340

341
TAOS_RES *taos_stmt_use_result(TAOS_STMT *stmt) {
9,248✔
342
  CHECK_PTR(fp_taos_stmt_use_result);
9,248✔
343
  return (*fp_taos_stmt_use_result)(stmt);
9,248✔
344
}
345

346
int taos_stmt_close(TAOS_STMT *stmt) {
139,734✔
347
  CHECK_INT(fp_taos_stmt_close);
139,734✔
348
  return (*fp_taos_stmt_close)(stmt);
139,734✔
349
}
350

351
char *taos_stmt_errstr(TAOS_STMT *stmt) {
9,896✔
352
  CHECK_PTR(fp_taos_stmt_errstr);
9,896✔
353
  return (*fp_taos_stmt_errstr)(stmt);
9,896✔
354
}
355

356
int taos_stmt_affected_rows(TAOS_STMT *stmt) {
3,036✔
357
  CHECK_INT(fp_taos_stmt_affected_rows);
3,036✔
358
  return (*fp_taos_stmt_affected_rows)(stmt);
3,036✔
359
}
360

361
int taos_stmt_affected_rows_once(TAOS_STMT *stmt) {
90✔
362
  CHECK_INT(fp_taos_stmt_affected_rows_once);
90✔
363
  return (*fp_taos_stmt_affected_rows_once)(stmt);
90✔
364
}
365

366
TAOS_STMT2 *taos_stmt2_init(TAOS *taos, TAOS_STMT2_OPTION *option) {
3,443✔
367
  CHECK_PTR(fp_taos_stmt2_init);
3,443✔
368
  return (*fp_taos_stmt2_init)(taos, option);
3,443✔
369
}
370

371
int taos_stmt2_prepare(TAOS_STMT2 *stmt, const char *sql, unsigned long length) {
3,451✔
372
  CHECK_INT(fp_taos_stmt2_prepare);
3,451✔
373
  return (*fp_taos_stmt2_prepare)(stmt, sql, length);
3,451✔
374
}
375

376
int taos_stmt2_bind_param(TAOS_STMT2 *stmt, TAOS_STMT2_BINDV *bindv, int32_t col_idx) {
557,994✔
377
  CHECK_INT(fp_taos_stmt2_bind_param);
557,994✔
378
  return (*fp_taos_stmt2_bind_param)(stmt, bindv, col_idx);
557,994✔
379
}
380

381
int taos_stmt2_bind_param_a(TAOS_STMT2 *stmt, TAOS_STMT2_BINDV *bindv, int32_t col_idx, __taos_async_fn_t fp,
×
382
                            void *param) {
383
  CHECK_INT(fp_taos_stmt2_bind_param_a);
×
384
  return (*fp_taos_stmt2_bind_param_a)(stmt, bindv, col_idx, fp, param);
×
385
}
386

387
int taos_stmt2_exec(TAOS_STMT2 *stmt, int *affected_rows) {
558,042✔
388
  CHECK_INT(fp_taos_stmt2_exec);
558,042✔
389
  return (*fp_taos_stmt2_exec)(stmt, affected_rows);
558,042✔
390
}
391

392
int taos_stmt2_close(TAOS_STMT2 *stmt) {
3,443✔
393
  CHECK_INT(fp_taos_stmt2_close);
3,443✔
394
  return (*fp_taos_stmt2_close)(stmt);
3,443✔
395
}
396

397
int taos_stmt2_is_insert(TAOS_STMT2 *stmt, int *insert) {
34✔
398
  CHECK_INT(fp_taos_stmt2_is_insert);
34✔
399
  return (*fp_taos_stmt2_is_insert)(stmt, insert);
34✔
400
}
401

402
int taos_stmt2_get_fields(TAOS_STMT2 *stmt, int *count, TAOS_FIELD_ALL **fields) {
25✔
403
  CHECK_INT(fp_taos_stmt2_get_fields);
25✔
404
  return (*fp_taos_stmt2_get_fields)(stmt, count, fields);
25✔
405
}
406

407
void taos_stmt2_free_fields(TAOS_STMT2 *stmt, TAOS_FIELD_ALL *fields) {
25✔
408
  CHECK_VOID(fp_taos_stmt2_free_fields);
25✔
409
  (*fp_taos_stmt2_free_fields)(stmt, fields);
25✔
410
}
411

412
TAOS_RES *taos_stmt2_result(TAOS_STMT2 *stmt) {
9✔
413
  CHECK_PTR(fp_taos_stmt2_result);
9✔
414
  return (*fp_taos_stmt2_result)(stmt);
9✔
415
}
416

417
char *taos_stmt2_error(TAOS_STMT2 *stmt) {
×
418
  CHECK_PTR(fp_taos_stmt2_error);
×
419
  return (*fp_taos_stmt2_error)(stmt);
×
420
}
421

422
TAOS_RES *taos_query(TAOS *taos, const char *sql) {
825,817,852✔
423
  CHECK_PTR(fp_taos_query);
825,817,852✔
424
  return (*fp_taos_query)(taos, sql);
825,817,852✔
425
}
426

427
TAOS_RES *taos_query_with_reqid(TAOS *taos, const char *sql, int64_t reqId) {
396,630✔
428
  CHECK_PTR(fp_taos_query_with_reqid);
396,630✔
429
  return (*fp_taos_query_with_reqid)(taos, sql, reqId);
396,630✔
430
}
431

432
TAOS_ROW taos_fetch_row(TAOS_RES *res) {
1,854,956,014✔
433
  CHECK_PTR(fp_taos_fetch_row);
1,854,956,014✔
434
  return (*fp_taos_fetch_row)(res);
1,854,956,014✔
435
}
436

437
int taos_result_precision(TAOS_RES *res) {
146,298,127✔
438
  CHECK_INT(fp_taos_result_precision);
146,298,127✔
439
  return (*fp_taos_result_precision)(res);
146,298,127✔
440
}
441

442
void taos_free_result(TAOS_RES *res) {
846,419,355✔
443
  CHECK_VOID(fp_taos_free_result);
846,419,355✔
444
  return (*fp_taos_free_result)(res);
846,419,355✔
445
}
446

447
void taos_kill_query(TAOS *taos) {
488✔
448
  CHECK_VOID(fp_taos_kill_query);
488✔
449
  return (*fp_taos_kill_query)(taos);
488✔
450
}
451

452
int taos_field_count(TAOS_RES *res) {
2,147,483,647✔
453
  CHECK_INT(fp_taos_field_count);
2,147,483,647✔
454
  return (*fp_taos_field_count)(res);
2,147,483,647✔
455
}
456

457
int taos_num_fields(TAOS_RES *res) {
2,019,605,502✔
458
  CHECK_INT(fp_taos_num_fields);
2,019,605,502✔
459
  return (*fp_taos_num_fields)(res);
2,019,605,502✔
460
}
461

462
int taos_affected_rows(TAOS_RES *res) {
596,704,983✔
463
  CHECK_INT(fp_taos_affected_rows);
596,704,983✔
464
  return (*fp_taos_affected_rows)(res);
596,704,983✔
465
}
466

467
int64_t taos_affected_rows64(TAOS_RES *res) {
1,308,648✔
468
  CHECK_INT(fp_taos_affected_rows64);
1,308,648✔
469
  return (*fp_taos_affected_rows64)(res);
1,308,648✔
470
}
471

472
TAOS_FIELD *taos_fetch_fields(TAOS_RES *res) {
190,277,260✔
473
  CHECK_PTR(fp_taos_fetch_fields);
190,277,260✔
474
  return (*fp_taos_fetch_fields)(res);
190,277,260✔
475
}
476

477
TAOS_FIELD_E *taos_fetch_fields_e(TAOS_RES *res) {
190✔
478
  CHECK_PTR(fp_taos_fetch_fields_e);
190✔
479
  return (*fp_taos_fetch_fields_e)(res);
190✔
480
}
481

482
int taos_select_db(TAOS *taos, const char *db) {
40,696✔
483
  CHECK_INT(fp_taos_select_db);
40,696✔
484
  return (*fp_taos_select_db)(taos, db);
40,696✔
485
}
486

487
int taos_print_row(char *str, TAOS_ROW row, TAOS_FIELD *fields, int num_fields) {
10,759,276✔
488
  CHECK_INT(fp_taos_print_row);
10,759,276✔
489
  return (*fp_taos_print_row)(str, row, fields, num_fields);
10,759,276✔
490
}
491

492
int taos_print_row_with_size(char *str, uint32_t size, TAOS_ROW row, TAOS_FIELD *fields, int num_fields) {
10,842,446✔
493
  CHECK_INT(fp_taos_print_row_with_size);
10,842,446✔
494
  return (*fp_taos_print_row_with_size)(str, size, row, fields, num_fields);
10,842,446✔
495
}
496

497
void taos_stop_query(TAOS_RES *res) {
122,503,564✔
498
  CHECK_VOID(fp_taos_stop_query);
122,503,564✔
499
  (*fp_taos_stop_query)(res);
122,503,564✔
500
}
501

502
bool taos_is_null(TAOS_RES *res, int32_t row, int32_t col) {
×
503
  CHECK_BOOL(fp_taos_is_null);
×
504
  return (*fp_taos_is_null)(res, row, col);
×
505
}
506

507
int taos_is_null_by_column(TAOS_RES *res, int columnIndex, bool result[], int *rows) {
446,446,767✔
508
  CHECK_INT(fp_taos_is_null_by_column);
446,446,767✔
509
  return (*fp_taos_is_null_by_column)(res, columnIndex, result, rows);
446,446,767✔
510
}
511

512
bool taos_is_update_query(TAOS_RES *res) {
356,532✔
513
  CHECK_BOOL(fp_taos_is_update_query);
356,532✔
514
  return (*fp_taos_is_update_query)(res);
356,532✔
515
}
516

517
int taos_fetch_block(TAOS_RES *res, TAOS_ROW *rows) {
212,860,182✔
518
  CHECK_INT(fp_taos_fetch_block);
212,860,182✔
519
  return (*fp_taos_fetch_block)(res, rows);
212,860,182✔
520
}
521

522
int taos_fetch_block_s(TAOS_RES *res, int *numOfRows, TAOS_ROW *rows) {
×
523
  CHECK_INT(fp_taos_fetch_block_s);
×
524
  return (*fp_taos_fetch_block_s)(res, numOfRows, rows);
×
525
}
526

527
int taos_fetch_raw_block(TAOS_RES *res, int *numOfRows, void **pData) {
56,080✔
528
  CHECK_INT(fp_taos_fetch_raw_block);
56,080✔
529
  return (*fp_taos_fetch_raw_block)(res, numOfRows, pData);
56,080✔
530
}
531

532
int *taos_get_column_data_offset(TAOS_RES *res, int columnIndex) {
139,793,092✔
533
  CHECK_PTR(fp_taos_get_column_data_offset);
139,793,092✔
534
  return (*fp_taos_get_column_data_offset)(res, columnIndex);
139,793,092✔
535
}
536

537
int taos_validate_sql(TAOS *taos, const char *sql) {
×
538
  CHECK_INT(fp_taos_validate_sql);
×
539
  return (*fp_taos_validate_sql)(taos, sql);
×
540
}
541

542
void taos_reset_current_db(TAOS *taos) {
×
543
  CHECK_VOID(fp_taos_reset_current_db);
×
544
  (*fp_taos_reset_current_db)(taos);
×
545
}
546

547
int *taos_fetch_lengths(TAOS_RES *res) {
1,843,043,528✔
548
  CHECK_PTR(fp_taos_fetch_lengths);
1,843,043,528✔
549
  return (*fp_taos_fetch_lengths)(res);
1,843,043,528✔
550
}
551

552
TAOS_ROW *taos_result_block(TAOS_RES *res) {
×
553
  CHECK_PTR(fp_taos_result_block);
×
554
  return (*fp_taos_result_block)(res);
×
555
}
556

557
const char *taos_get_server_info(TAOS *taos) {
4,715✔
558
  CHECK_PTR(fp_taos_get_server_info);
4,715✔
559
  return (*fp_taos_get_server_info)(taos);
4,715✔
560
}
561

562
const char *taos_get_client_info() {
1,261,806✔
563
  if (fp_taos_get_client_info == NULL) {
1,261,806✔
564
    return td_version;
390,531✔
565
  } else {
566
    return (*fp_taos_get_client_info)();
871,275✔
567
  }
568
}
569

570
int taos_get_current_db(TAOS *taos, char *database, int len, int *required) {
×
571
  CHECK_INT(fp_taos_get_current_db);
×
572
  return (*fp_taos_get_current_db)(taos, database, len, required);
×
573
}
574

575
int taos_get_connection_info(TAOS *taos, TSDB_CONNECTION_INFO info, char *buffer, int* len) {
×
576
  CHECK_INT(fp_taos_get_connection_info);
×
577
  return (*fp_taos_get_connection_info)(taos, info, buffer, len);
×
578
}
579

580
const char *taos_errstr(TAOS_RES *res) {
69,725,057✔
581
  (void)taos_init();
69,725,057✔
582
  if (fp_taos_errstr == NULL) {
69,725,057✔
583
    return tstrerror(terrno);
×
584
  }
585
  return (*fp_taos_errstr)(res);
69,725,057✔
586
}
587

588
int taos_errno(TAOS_RES *res) {
1,116,460,872✔
589
  (void)taos_init();
1,116,460,872✔
590
  if (fp_taos_errno == NULL) {
1,116,457,978✔
591
    return terrno;
×
592
  }
593
  return (*fp_taos_errno)(res);
1,116,457,978✔
594
}
595

596
void taos_query_a(TAOS *taos, const char *sql, __taos_async_fn_t fp, void *param) {
1,152✔
597
  CHECK_VOID(fp_taos_query_a);
1,152✔
598
  (*fp_taos_query_a)(taos, sql, fp, param);
1,152✔
599
}
600

601
void taos_query_a_with_reqid(TAOS *taos, const char *sql, __taos_async_fn_t fp, void *param, int64_t reqid) {
×
602
  CHECK_VOID(fp_taos_query_a_with_reqid);
×
603
  (*fp_taos_query_a_with_reqid)(taos, sql, fp, param, reqid);
×
604
}
605

606
void taos_fetch_rows_a(TAOS_RES *res, __taos_async_fn_t fp, void *param) {
62,995,921✔
607
  CHECK_VOID(fp_taos_fetch_rows_a);
62,995,921✔
608
  (*fp_taos_fetch_rows_a)(res, fp, param);
62,995,921✔
609
}
610

611
void taos_fetch_raw_block_a(TAOS_RES *res, __taos_async_fn_t fp, void *param) {
153✔
612
  CHECK_VOID(fp_taos_fetch_raw_block_a);
153✔
613
  (*fp_taos_fetch_raw_block_a)(res, fp, param);
153✔
614
}
615

616
const void *taos_get_raw_block(TAOS_RES *res) {
90✔
617
  CHECK_PTR(fp_taos_get_raw_block);
90✔
618
  return (*fp_taos_get_raw_block)(res);
90✔
619
}
620

621
int taos_get_db_route_info(TAOS *taos, const char *db, TAOS_DB_ROUTE_INFO *dbInfo) {
×
622
  CHECK_INT(fp_taos_get_db_route_info);
×
623
  return (*fp_taos_get_db_route_info)(taos, db, dbInfo);
×
624
}
625

626
int taos_get_table_vgId(TAOS *taos, const char *db, const char *table, int *vgId) {
×
627
  CHECK_INT(fp_taos_get_table_vgId);
×
628
  return (*fp_taos_get_table_vgId)(taos, db, table, vgId);
×
629
}
630

631
int taos_get_tables_vgId(TAOS *taos, const char *db, const char *table[], int tableNum, int *vgId) {
×
632
  CHECK_INT(fp_taos_get_tables_vgId);
×
633
  return (*fp_taos_get_tables_vgId)(taos, db, table, tableNum, vgId);
×
634
}
635

636
int taos_load_table_info(TAOS *taos, const char *tableNameList) {
1,156✔
637
  CHECK_INT(fp_taos_load_table_info);
1,156✔
638
  return (*fp_taos_load_table_info)(taos, tableNameList);
1,156✔
639
}
640

641
void taos_set_hb_quit(int8_t quitByKill) {
871,465✔
642
  if (taos_init() != 0) {
871,465✔
643
    return;
×
644
  }
645

646
  CHECK_VOID(fp_taos_set_hb_quit);
871,465✔
647
  return (*fp_taos_set_hb_quit)(quitByKill);
871,465✔
648
}
649

UNCOV
650
int taos_set_notify_cb(TAOS *taos, __taos_notify_fn_t fp, void *param, int type) {
×
UNCOV
651
  CHECK_INT(fp_taos_set_notify_cb);
×
UNCOV
652
  return (*fp_taos_set_notify_cb)(taos, fp, param, type);
×
653
}
654

655
void taos_fetch_whitelist_a(TAOS *taos, __taos_async_whitelist_fn_t fp, void *param) {
×
656
  CHECK_VOID(fp_taos_fetch_whitelist_a);
×
657
  return (*fp_taos_fetch_whitelist_a)(taos, fp, param);
×
658
}
659

660
void taos_fetch_whitelist_dual_stack_a(TAOS *taos, __taos_async_whitelist_dual_stack_fn_t fp, void *param) {
×
661
  CHECK_VOID(fp_taos_fetch_whitelist_dual_stack_a);
×
662
  return (*fp_taos_fetch_whitelist_dual_stack_a)(taos, fp, param);
×
663
}
664

665
void taos_fetch_ip_whitelist_a(TAOS *taos, __taos_async_ip_whitelist_fn_t fp, void *param) {
×
666
  CHECK_VOID(fp_taos_fetch_ip_whitelist_a);
×
667
  return (*fp_taos_fetch_ip_whitelist_a)(taos, fp, param);
×
668
}
669

670
void taos_fetch_datetime_whitelist_a(TAOS *taos, __taos_async_datetime_whitelist_fn_t fp, void *param) {
×
671
  CHECK_VOID(fp_taos_fetch_datetime_whitelist_a);
×
672
  return (*fp_taos_fetch_datetime_whitelist_a)(taos, fp, param);
×
673
}
674

675
int taos_set_conn_mode(TAOS *taos, int mode, int value) {
2,351✔
676
  CHECK_INT(fp_taos_set_conn_mode);
2,351✔
677
  return (*fp_taos_set_conn_mode)(taos, mode, value);
2,351✔
678
}
679

680
TAOS_RES *taos_schemaless_insert(TAOS *taos, char *lines[], int numLines, int protocol, int precision) {
430,774✔
681
  CHECK_PTR(fp_taos_schemaless_insert);
430,774✔
682
  return (*fp_taos_schemaless_insert)(taos, lines, numLines, protocol, precision);
430,774✔
683
}
684

685
TAOS_RES *taos_schemaless_insert_with_reqid(TAOS *taos, char *lines[], int numLines, int protocol, int precision,
×
686
                                            int64_t reqid) {
687
  CHECK_PTR(fp_taos_schemaless_insert_with_reqid);
×
688
  return (*fp_taos_schemaless_insert_with_reqid)(taos, lines, numLines, protocol, precision, reqid);
×
689
}
690

691
TAOS_RES *taos_schemaless_insert_raw(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol,
27✔
692
                                     int precision) {
693
  CHECK_PTR(fp_taos_schemaless_insert_raw);
27✔
694
  return (*fp_taos_schemaless_insert_raw)(taos, lines, len, totalRows, protocol, precision);
27✔
695
}
696

697
TAOS_RES *taos_schemaless_insert_raw_with_reqid(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol,
36✔
698
                                                int precision, int64_t reqid) {
699
  CHECK_PTR(fp_taos_schemaless_insert_raw_with_reqid);
36✔
700
  return (*fp_taos_schemaless_insert_raw_with_reqid)(taos, lines, len, totalRows, protocol, precision, reqid);
36✔
701
}
702

703
TAOS_RES *taos_schemaless_insert_ttl(TAOS *taos, char *lines[], int numLines, int protocol, int precision,
×
704
                                     int32_t ttl) {
705
  CHECK_PTR(fp_taos_schemaless_insert_ttl);
×
706
  return (*fp_taos_schemaless_insert_ttl)(taos, lines, numLines, protocol, precision, ttl);
×
707
}
708

709
TAOS_RES *taos_schemaless_insert_ttl_with_reqid(TAOS *taos, char *lines[], int numLines, int protocol, int precision,
35,867✔
710
                                                int32_t ttl, int64_t reqid) {
711
  CHECK_PTR(fp_taos_schemaless_insert_ttl_with_reqid);
35,867✔
712
  return (*fp_taos_schemaless_insert_ttl_with_reqid)(taos, lines, numLines, protocol, precision, ttl, reqid);
35,867✔
713
}
714

715
TAOS_RES *taos_schemaless_insert_raw_ttl(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol,
×
716
                                         int precision, int32_t ttl) {
717
  CHECK_PTR(fp_taos_schemaless_insert_raw_ttl);
×
718
  return (*fp_taos_schemaless_insert_raw_ttl)(taos, lines, len, totalRows, protocol, precision, ttl);
×
719
}
720

721
TAOS_RES *taos_schemaless_insert_raw_ttl_with_reqid(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol,
117✔
722
                                                    int precision, int32_t ttl, int64_t reqid) {
723
  CHECK_PTR(fp_taos_schemaless_insert_raw_ttl_with_reqid);
117✔
724
  return (*fp_taos_schemaless_insert_raw_ttl_with_reqid)(taos, lines, len, totalRows, protocol, precision, ttl, reqid);
117✔
725
}
726

727
TAOS_RES *taos_schemaless_insert_raw_ttl_with_reqid_tbname_key(TAOS *taos, char *lines, int len, int32_t *totalRows,
×
728
                                                               int protocol, int precision, int32_t ttl, int64_t reqid,
729
                                                               char *tbnameKey) {
730
  CHECK_PTR(fp_taos_schemaless_insert_raw_ttl_with_reqid_tbname_key);
×
731
  return (*fp_taos_schemaless_insert_raw_ttl_with_reqid_tbname_key)(taos, lines, len, totalRows, protocol, precision,
×
732
                                                                    ttl, reqid, tbnameKey);
733
}
734

735
TAOS_RES *taos_schemaless_insert_ttl_with_reqid_tbname_key(TAOS *taos, char *lines[], int numLines, int protocol,
35,867✔
736
                                                           int precision, int32_t ttl, int64_t reqid, char *tbnameKey) {
737
  CHECK_PTR(fp_taos_schemaless_insert_ttl_with_reqid_tbname_key);
35,867✔
738
  return (*fp_taos_schemaless_insert_ttl_with_reqid_tbname_key)(taos, lines, numLines, protocol, precision, ttl, reqid,
35,867✔
739
                                                                tbnameKey);
740
}
741

742
tmq_conf_t *tmq_conf_new() {
29,778✔
743
  (void)taos_init();
29,778✔
744
  CHECK_PTR(fp_tmq_conf_new);
29,778✔
745
  return (*fp_tmq_conf_new)();
29,778✔
746
}
747

748
tmq_conf_res_t tmq_conf_set(tmq_conf_t *conf, const char *key, const char *value) {
171,686✔
749
  CHECK_INT(fp_tmq_conf_set);
171,686✔
750
  return (*fp_tmq_conf_set)(conf, key, value);
171,686✔
751
}
752

753
void tmq_conf_destroy(tmq_conf_t *conf) {
29,778✔
754
  CHECK_VOID(fp_tmq_conf_destroy);
29,778✔
755
  (*fp_tmq_conf_destroy)(conf);
29,778✔
756
}
757

758
void tmq_conf_set_auto_commit_cb(tmq_conf_t *conf, tmq_commit_cb *cb, void *param) {
1,012✔
759
  CHECK_VOID(fp_tmq_conf_set_auto_commit_cb);
1,012✔
760
  (*fp_tmq_conf_set_auto_commit_cb)(conf, cb, param);
1,012✔
761
}
762

763
tmq_list_t *tmq_list_new() {
33,331✔
764
  (void)taos_init();
33,331✔
765
  CHECK_PTR(fp_tmq_list_new);
33,367✔
766
  return (*fp_tmq_list_new)();
33,367✔
767
}
768

769
int32_t tmq_list_append(tmq_list_t *tlist, const char *val) {
31,428✔
770
  CHECK_INT(fp_tmq_list_append);
31,428✔
771
  return (*fp_tmq_list_append)(tlist, val);
31,428✔
772
}
773

774
void tmq_list_destroy(tmq_list_t *tlist) {
33,374✔
775
  CHECK_VOID(fp_tmq_list_destroy);
33,374✔
776
  (*fp_tmq_list_destroy)(tlist);
33,374✔
777
}
778

779
int32_t tmq_list_get_size(const tmq_list_t *tlist) {
1,903✔
780
  CHECK_INT(fp_tmq_list_get_size);
1,903✔
781
  return (*fp_tmq_list_get_size)(tlist);
1,903✔
782
}
783

784
char **tmq_list_to_c_array(const tmq_list_t *tlist) {
1,903✔
785
  CHECK_PTR(fp_tmq_list_to_c_array);
1,903✔
786
  return (*fp_tmq_list_to_c_array)(tlist);
1,903✔
787
}
788

789
tmq_t *tmq_consumer_new(tmq_conf_t *conf, char *errstr, int32_t errstrLen) {
29,778✔
790
  (void)taos_init();
29,778✔
791
  CHECK_PTR(fp_tmq_consumer_new);
29,778✔
792
  return (*fp_tmq_consumer_new)(conf, errstr, errstrLen);
29,778✔
793
}
794

795
int32_t tmq_subscribe(tmq_t *tmq, const tmq_list_t *topic_list) {
31,471✔
796
  CHECK_INT(fp_tmq_subscribe);
31,471✔
797
  return (*fp_tmq_subscribe)(tmq, topic_list);
31,471✔
798
}
799

800
int32_t tmq_unsubscribe(tmq_t *tmq) {
18,436✔
801
  CHECK_INT(fp_tmq_unsubscribe);
18,436✔
802
  return (*fp_tmq_unsubscribe)(tmq);
18,436✔
803
}
804

805
int32_t tmq_subscription(tmq_t *tmq, tmq_list_t **topics) {
1,903✔
806
  CHECK_INT(fp_tmq_subscription);
1,903✔
807
  return (*fp_tmq_subscription)(tmq, topics);
1,903✔
808
}
809

810
TAOS_RES *tmq_consumer_poll(tmq_t *tmq, int64_t timeout) {
419,675✔
811
  CHECK_PTR(fp_tmq_consumer_poll);
419,675✔
812
  return (*fp_tmq_consumer_poll)(tmq, timeout);
419,675✔
813
}
814

815
int32_t tmq_consumer_close(tmq_t *tmq) {
29,848✔
816
  CHECK_INT(fp_tmq_consumer_close);
29,848✔
817
  return (*fp_tmq_consumer_close)(tmq);
29,848✔
818
}
819

820
int32_t tmq_commit_sync(tmq_t *tmq, const TAOS_RES *msg) {
9,692✔
821
  CHECK_INT(fp_tmq_commit_sync);
9,692✔
822
  return (*fp_tmq_commit_sync)(tmq, msg);
9,692✔
823
}
824

825
void tmq_commit_async(tmq_t *tmq, const TAOS_RES *msg, tmq_commit_cb *cb, void *param) {
×
826
  CHECK_VOID(fp_tmq_commit_async);
×
827
  (*fp_tmq_commit_async)(tmq, msg, cb, param);
×
828
}
829

830
int32_t tmq_commit_offset_sync(tmq_t *tmq, const char *pTopicName, int32_t vgId, int64_t offset) {
2,409✔
831
  CHECK_INT(fp_tmq_commit_offset_sync);
2,409✔
832
  return (*fp_tmq_commit_offset_sync)(tmq, pTopicName, vgId, offset);
2,409✔
833
}
834

835
void tmq_commit_offset_async(tmq_t *tmq, const char *pTopicName, int32_t vgId, int64_t offset, tmq_commit_cb *cb,
×
836
                             void *param) {
837
  CHECK_VOID(fp_tmq_commit_offset_async);
×
838
  (*fp_tmq_commit_offset_async)(tmq, pTopicName, vgId, offset, cb, param);
×
839
}
840

841
int32_t tmq_get_topic_assignment(tmq_t *tmq, const char *pTopicName, tmq_topic_assignment **assignment,
1,933✔
842
                                 int32_t *numOfAssignment) {
843
  CHECK_INT(fp_tmq_get_topic_assignment);
1,933✔
844
  return (*fp_tmq_get_topic_assignment)(tmq, pTopicName, assignment, numOfAssignment);
1,933✔
845
}
846

847
void tmq_free_assignment(tmq_topic_assignment *pAssignment) {
1,891✔
848
  CHECK_VOID(fp_tmq_free_assignment);
1,891✔
849
  (*fp_tmq_free_assignment)(pAssignment);
1,891✔
850
}
851

852
int32_t tmq_offset_seek(tmq_t *tmq, const char *pTopicName, int32_t vgId, int64_t offset) {
1,452✔
853
  CHECK_INT(fp_tmq_offset_seek);
1,452✔
854
  return (*fp_tmq_offset_seek)(tmq, pTopicName, vgId, offset);
1,452✔
855
}
856

857
int64_t tmq_position(tmq_t *tmq, const char *pTopicName, int32_t vgId) {
3,600✔
858
  CHECK_INT(fp_tmq_position);
3,600✔
859
  return (*fp_tmq_position)(tmq, pTopicName, vgId);
3,600✔
860
}
861

862
int64_t tmq_committed(tmq_t *tmq, const char *pTopicName, int32_t vgId) {
4,200✔
863
  CHECK_INT(fp_tmq_committed);
4,200✔
864
  return (*fp_tmq_committed)(tmq, pTopicName, vgId);
4,200✔
865
}
866

867
TAOS *tmq_get_connect(tmq_t *tmq) {
×
868
  CHECK_PTR(fp_tmq_get_connect);
×
869
  return (*fp_tmq_get_connect)(tmq);
×
870
}
871

872
const char *tmq_get_table_name(TAOS_RES *res) {
17,833,404✔
873
  CHECK_PTR(fp_tmq_get_table_name);
17,833,404✔
874
  return (*fp_tmq_get_table_name)(res);
17,833,404✔
875
}
876

877
tmq_res_t tmq_get_res_type(TAOS_RES *res) {
385,587✔
878
  CHECK_INT(fp_tmq_get_res_type);
385,587✔
879
  return (*fp_tmq_get_res_type)(res);
385,587✔
880
}
881

882
const char *tmq_get_topic_name(TAOS_RES *res) {
6,262✔
883
  CHECK_PTR(fp_tmq_get_topic_name);
6,262✔
884
  return (*fp_tmq_get_topic_name)(res);
6,262✔
885
}
886

887
const char *tmq_get_db_name(TAOS_RES *res) {
6,208✔
888
  CHECK_PTR(fp_tmq_get_db_name);
6,208✔
889
  return (*fp_tmq_get_db_name)(res);
6,208✔
890
}
891

892
int32_t tmq_get_vgroup_id(TAOS_RES *res) {
6,262✔
893
  CHECK_INT(fp_tmq_get_vgroup_id);
6,262✔
894
  return (*fp_tmq_get_vgroup_id)(res);
6,262✔
895
}
896

897
int64_t tmq_get_vgroup_offset(TAOS_RES *res) {
144,268✔
898
  CHECK_INT(fp_tmq_get_vgroup_offset);
144,268✔
899
  return (*fp_tmq_get_vgroup_offset)(res);
144,268✔
900
}
901

902
const char *tmq_err2str(int32_t code) {
705✔
903
  CHECK_PTR(fp_tmq_err2str);
705✔
904
  return (*fp_tmq_err2str)(code);
705✔
905
}
906

907
int32_t tmq_get_raw(TAOS_RES *res, tmq_raw_data *raw) {
54✔
908
  CHECK_INT(fp_tmq_get_raw);
54✔
909
  return (*fp_tmq_get_raw)(res, raw);
54✔
910
}
911

912
int32_t tmq_write_raw(TAOS *taos, tmq_raw_data raw) {
×
913
  CHECK_INT(fp_tmq_write_raw);
×
914
  return (*fp_tmq_write_raw)(taos, raw);
×
915
}
916

917
int taos_write_raw_block(TAOS *taos, int numOfRows, char *pData, const char *tbname) {
×
918
  CHECK_INT(fp_taos_write_raw_block);
×
919
  return (*fp_taos_write_raw_block)(taos, numOfRows, pData, tbname);
×
920
}
921

922
int taos_write_raw_block_with_reqid(TAOS *taos, int numOfRows, char *pData, const char *tbname, int64_t reqid) {
×
923
  CHECK_INT(fp_taos_write_raw_block_with_reqid);
×
924
  return (*fp_taos_write_raw_block_with_reqid)(taos, numOfRows, pData, tbname, reqid);
×
925
}
926

927
int taos_write_raw_block_with_fields(TAOS *taos, int rows, char *pData, const char *tbname, TAOS_FIELD *fields,
×
928
                                     int numFields) {
929
  CHECK_INT(fp_taos_write_raw_block_with_fields);
×
930
  return (*fp_taos_write_raw_block_with_fields)(taos, rows, pData, tbname, fields, numFields);
×
931
}
932

933
int taos_write_raw_block_with_fields_with_reqid(TAOS *taos, int rows, char *pData, const char *tbname,
×
934
                                                TAOS_FIELD *fields, int numFields, int64_t reqid) {
935
  CHECK_INT(fp_taos_write_raw_block_with_fields_with_reqid);
×
936
  return (*fp_taos_write_raw_block_with_fields_with_reqid)(taos, rows, pData, tbname, fields, numFields, reqid);
×
937
}
938

939
void tmq_free_raw(tmq_raw_data raw) {
×
940
  CHECK_VOID(fp_tmq_free_raw);
×
941
  (*fp_tmq_free_raw)(raw);
×
942
}
943

944
char *tmq_get_json_meta(TAOS_RES *res) {
1,962✔
945
  CHECK_PTR(fp_tmq_get_json_meta);
1,962✔
946
  return (*fp_tmq_get_json_meta)(res);
1,962✔
947
}
948

949
void tmq_free_json_meta(char *jsonMeta) {
1,962✔
950
  CHECK_VOID(fp_tmq_free_json_meta);
1,962✔
951
  return (*fp_tmq_free_json_meta)(jsonMeta);
1,962✔
952
}
953

954
TSDB_SERVER_STATUS taos_check_server_status(const char *fqdn, int port, char *details, int maxlen) {
248✔
955
  CHECK_INT(fp_taos_check_server_status);
248✔
956
  return (*fp_taos_check_server_status)(fqdn, port, details, maxlen);
248✔
957
}
958

959
void taos_write_crashinfo(int signum, void *sigInfo, void *context) {
×
960
  (void)taos_init();
×
961
  CHECK_VOID(fp_taos_write_crashinfo);
×
962
  (*fp_taos_write_crashinfo)(signum, sigInfo, context);
×
963
}
964

965
char *getBuildInfo() {
×
966
  (void)taos_init();
×
967
  CHECK_PTR(fp_getBuildInfo);
×
968
  return (*fp_getBuildInfo)();
×
969
}
970

971
int32_t taos_connect_is_alive(TAOS *taos) {
×
972
  CHECK_INT(fp_taos_connect_is_alive);
×
973
  return (*fp_taos_connect_is_alive)(taos);
×
974
}
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