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

taosdata / TDengine / #4879

11 Dec 2025 02:43AM UTC coverage: 64.544% (-0.03%) from 64.569%
#4879

push

travis-ci

guanshengliang
feat(TS-7270): internal dependence

307 of 617 new or added lines in 24 files covered. (49.76%)

3883 existing lines in 125 files now uncovered.

163565 of 253417 relevant lines covered (64.54%)

105600506.39 hits per line

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

69.31
/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) {
475✔
87
  if (taos_init() != 0) {
475✔
88
    ERR_CONFRET(TSDB_CODE_DLL_NOT_LOAD)
×
89
  }
90

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

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

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

110
int taos_init(void) {
868,042,661✔
111
  (void)taosThreadOnce(&tsDriverOnce, taos_init_driver);
868,042,661✔
112
  (void)taosThreadOnce(&tsInitOnce, taos_init_wrapper);
868,035,883✔
113
  return tsInitOnceRet;
868,037,405✔
114
}
115

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

121
int taos_options(TSDB_OPTION option, const void *arg, ...) {
1,580,267✔
122
  if (option == TSDB_OPTION_DRIVER) {
1,580,267✔
123
    if (tsDriver == NULL) {
959,910✔
124
      if (strcasecmp((const char *)arg, "native") == 0) {
959,910✔
125
        tsDriverType = DRIVER_NATIVE;
934,077✔
126
        return 0;
934,077✔
127
      }
128
      if (strcasecmp((const char *)arg, "websocket") == 0) {
25,833✔
129
        tsDriverType = DRIVER_WEBSOCKET;
25,833✔
130
        return 0;
25,833✔
131
      }
132
    }
133
    terrno = TSDB_CODE_REPEAT_INIT;
×
134
    return -1;
×
135
  }
136
  (void)taosThreadOnce(&tsDriverOnce, taos_init_driver);
620,357✔
137

138
  CHECK_INT(fp_taos_options);
620,357✔
139
  return (*fp_taos_options)(option, arg);
620,357✔
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) {
3,316,409✔
148
  if (taos_init() != 0) {
3,316,409✔
149
    //terrno = TSDB_CODE_DLL_NOT_LOAD;
150
    return NULL;
×
151
  }
152

153
  CHECK_PTR(fp_taos_connect);
3,317,056✔
154
  return (*fp_taos_connect)(ip, user, pass, db, port);
3,317,056✔
155
}
156

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

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

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

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

NEW
186
  CHECK_PTR(fp_taos_connect_token);
×
NEW
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) {
835✔
191
  if (taos_init() != 0) {
835✔
192
    terrno = TSDB_CODE_DLL_NOT_LOAD;
×
193
    return NULL;
×
194
  }
195

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

200
TAOS *taos_connect_with_dsn(const char *dsn) {
6,812✔
201
  if (taos_init() != 0) {
6,812✔
202
    return NULL;
×
203
  }
204

205
  CHECK_PTR(fp_taos_connect_with_dsn);
6,812✔
206
  return (*fp_taos_connect_with_dsn)(dsn);
6,812✔
207
}
208

209
void taos_close(TAOS *taos) {
3,304,437✔
210
  CHECK_VOID(fp_taos_close);
3,304,437✔
211
  (*fp_taos_close)(taos);
3,304,437✔
212
}
213

214
const char *taos_data_type(int type) {
×
215
  (void)taos_init();
×
216
  CHECK_PTR(fp_taos_data_type);
×
UNCOV
217
  return (*fp_taos_data_type)(type);
×
218
}
219

220
TAOS_STMT *taos_stmt_init(TAOS *taos) {
507,717✔
221
  CHECK_PTR(fp_taos_stmt_init);
507,717✔
222
  return (*fp_taos_stmt_init)(taos);
507,717✔
223
}
224

225
TAOS_STMT *taos_stmt_init_with_reqid(TAOS *taos, int64_t reqid) {
12,460✔
226
  CHECK_PTR(fp_taos_stmt_init_with_reqid);
12,460✔
227
  return (*fp_taos_stmt_init_with_reqid)(taos, reqid);
12,460✔
228
}
229

230
TAOS_STMT *taos_stmt_init_with_options(TAOS *taos, TAOS_STMT_OPTIONS *options) {
33,024✔
231
  CHECK_PTR(fp_taos_stmt_init_with_options);
33,024✔
232
  return (*fp_taos_stmt_init_with_options)(taos, options);
33,024✔
233
}
234

235
int taos_stmt_prepare(TAOS_STMT *stmt, const char *sql, unsigned long length) {
1,091,910✔
236
  CHECK_INT(fp_taos_stmt_prepare);
1,091,910✔
237
  return (*fp_taos_stmt_prepare)(stmt, sql, length);
1,091,910✔
238
}
239

240
int taos_stmt_set_tbname_tags(TAOS_STMT *stmt, const char *name, TAOS_MULTI_BIND *tags) {
20,982✔
241
  CHECK_INT(fp_taos_stmt_set_tbname_tags);
20,982✔
242
  return (*fp_taos_stmt_set_tbname_tags)(stmt, name, tags);
20,982✔
243
}
244

245
int taos_stmt_set_tbname(TAOS_STMT *stmt, const char *name) {
16,630,148✔
246
  CHECK_INT(fp_taos_stmt_set_tbname);
16,630,148✔
247
  return (*fp_taos_stmt_set_tbname)(stmt, name);
16,630,148✔
248
}
249

250
int taos_stmt_set_tags(TAOS_STMT *stmt, TAOS_MULTI_BIND *tags) {
5,220✔
251
  CHECK_INT(fp_taos_stmt_set_tags);
5,220✔
252
  return (*fp_taos_stmt_set_tags)(stmt, tags);
5,220✔
253
}
254

UNCOV
255
int taos_stmt_set_sub_tbname(TAOS_STMT *stmt, const char *name) {
×
UNCOV
256
  CHECK_INT(fp_taos_stmt_set_sub_tbname);
×
UNCOV
257
  return (*fp_taos_stmt_set_sub_tbname)(stmt, name);
×
258
}
259

UNCOV
260
int taos_stmt_get_tag_fields(TAOS_STMT *stmt, int *fieldNum, TAOS_FIELD_E **fields) {
×
UNCOV
261
  CHECK_INT(fp_taos_stmt_get_tag_fields);
×
UNCOV
262
  return (*fp_taos_stmt_get_tag_fields)(stmt, fieldNum, fields);
×
263
}
264

UNCOV
265
int taos_stmt_get_col_fields(TAOS_STMT *stmt, int *fieldNum, TAOS_FIELD_E **fields) {
×
UNCOV
266
  CHECK_INT(fp_taos_stmt_get_col_fields);
×
UNCOV
267
  return (*fp_taos_stmt_get_col_fields)(stmt, fieldNum, fields);
×
268
}
269

UNCOV
270
void taos_stmt_reclaim_fields(TAOS_STMT *stmt, TAOS_FIELD_E *fields) {
×
UNCOV
271
  CHECK_VOID(fp_taos_stmt_reclaim_fields);
×
UNCOV
272
  (*fp_taos_stmt_reclaim_fields)(stmt, fields);
×
273
}
274

UNCOV
275
int taos_stmt_is_insert(TAOS_STMT *stmt, int *insert) {
×
UNCOV
276
  CHECK_INT(fp_taos_stmt_is_insert);
×
UNCOV
277
  return (*fp_taos_stmt_is_insert)(stmt, insert);
×
278
}
279

UNCOV
280
int taos_stmt_num_params(TAOS_STMT *stmt, int *nums) {
×
UNCOV
281
  CHECK_INT(fp_taos_stmt_num_params);
×
UNCOV
282
  return (*fp_taos_stmt_num_params)(stmt, nums);
×
283
}
284

UNCOV
285
int taos_stmt_get_param(TAOS_STMT *stmt, int idx, int *type, int *bytes) {
×
UNCOV
286
  CHECK_INT(fp_taos_stmt_get_param);
×
UNCOV
287
  return (*fp_taos_stmt_get_param)(stmt, idx, type, bytes);
×
288
}
289

290
int taos_stmt_bind_param(TAOS_STMT *stmt, TAOS_MULTI_BIND *bind) {
71,025✔
291
  CHECK_INT(fp_taos_stmt_bind_param);
71,025✔
292
  return (*fp_taos_stmt_bind_param)(stmt, bind);
71,025✔
293
}
294

295
int taos_stmt_bind_param_batch(TAOS_STMT *stmt, TAOS_MULTI_BIND *bind) {
557,769,623✔
296
  CHECK_INT(fp_taos_stmt_bind_param_batch);
557,769,623✔
297
  return (*fp_taos_stmt_bind_param_batch)(stmt, bind);
557,769,623✔
298
}
299

300
int taos_stmt_bind_single_param_batch(TAOS_STMT *stmt, TAOS_MULTI_BIND *bind, int colIdx) {
31,920✔
301
  CHECK_INT(fp_taos_stmt_bind_single_param_batch);
31,920✔
302
  return (*fp_taos_stmt_bind_single_param_batch)(stmt, bind, colIdx);
31,920✔
303
}
304

305
int taos_stmt_add_batch(TAOS_STMT *stmt) {
542,572,055✔
306
  CHECK_INT(fp_taos_stmt_add_batch);
542,572,055✔
307
  return (*fp_taos_stmt_add_batch)(stmt);
542,572,055✔
308
}
309

310
int taos_stmt_execute(TAOS_STMT *stmt) {
7,115,514✔
311
  CHECK_INT(fp_taos_stmt_execute);
7,115,514✔
312
  return (*fp_taos_stmt_execute)(stmt);
7,115,514✔
313
}
314

315
TAOS_RES *taos_stmt_use_result(TAOS_STMT *stmt) {
10,208✔
316
  CHECK_PTR(fp_taos_stmt_use_result);
10,208✔
317
  return (*fp_taos_stmt_use_result)(stmt);
10,208✔
318
}
319

320
int taos_stmt_close(TAOS_STMT *stmt) {
540,741✔
321
  CHECK_INT(fp_taos_stmt_close);
540,741✔
322
  return (*fp_taos_stmt_close)(stmt);
540,741✔
323
}
324

325
char *taos_stmt_errstr(TAOS_STMT *stmt) {
10,631✔
326
  CHECK_PTR(fp_taos_stmt_errstr);
10,631✔
327
  return (*fp_taos_stmt_errstr)(stmt);
10,631✔
328
}
329

330
int taos_stmt_affected_rows(TAOS_STMT *stmt) {
5,058✔
331
  CHECK_INT(fp_taos_stmt_affected_rows);
5,058✔
332
  return (*fp_taos_stmt_affected_rows)(stmt);
5,058✔
333
}
334

335
int taos_stmt_affected_rows_once(TAOS_STMT *stmt) {
4,070✔
336
  CHECK_INT(fp_taos_stmt_affected_rows_once);
4,070✔
337
  return (*fp_taos_stmt_affected_rows_once)(stmt);
4,070✔
338
}
339

340
TAOS_STMT2 *taos_stmt2_init(TAOS *taos, TAOS_STMT2_OPTION *option) {
26,264✔
341
  CHECK_PTR(fp_taos_stmt2_init);
26,264✔
342
  return (*fp_taos_stmt2_init)(taos, option);
26,264✔
343
}
344

345
int taos_stmt2_prepare(TAOS_STMT2 *stmt, const char *sql, unsigned long length) {
28,248✔
346
  CHECK_INT(fp_taos_stmt2_prepare);
28,248✔
347
  return (*fp_taos_stmt2_prepare)(stmt, sql, length);
28,248✔
348
}
349

350
int taos_stmt2_bind_param(TAOS_STMT2 *stmt, TAOS_STMT2_BINDV *bindv, int32_t col_idx) {
9,774,470✔
351
  CHECK_INT(fp_taos_stmt2_bind_param);
9,774,470✔
352
  return (*fp_taos_stmt2_bind_param)(stmt, bindv, col_idx);
9,774,470✔
353
}
354

UNCOV
355
int taos_stmt2_bind_param_a(TAOS_STMT2 *stmt, TAOS_STMT2_BINDV *bindv, int32_t col_idx, __taos_async_fn_t fp,
×
356
                            void *param) {
UNCOV
357
  CHECK_INT(fp_taos_stmt2_bind_param_a);
×
UNCOV
358
  return (*fp_taos_stmt2_bind_param_a)(stmt, bindv, col_idx, fp, param);
×
359
}
360

361
int taos_stmt2_exec(TAOS_STMT2 *stmt, int *affected_rows) {
9,776,316✔
362
  CHECK_INT(fp_taos_stmt2_exec);
9,776,316✔
363
  return (*fp_taos_stmt2_exec)(stmt, affected_rows);
9,776,316✔
364
}
365

366
int taos_stmt2_close(TAOS_STMT2 *stmt) {
26,264✔
367
  CHECK_INT(fp_taos_stmt2_close);
26,264✔
368
  return (*fp_taos_stmt2_close)(stmt);
26,264✔
369
}
370

371
int taos_stmt2_is_insert(TAOS_STMT2 *stmt, int *insert) {
939✔
372
  CHECK_INT(fp_taos_stmt2_is_insert);
939✔
373
  return (*fp_taos_stmt2_is_insert)(stmt, insert);
939✔
374
}
375

376
int taos_stmt2_get_fields(TAOS_STMT2 *stmt, int *count, TAOS_FIELD_ALL **fields) {
694✔
377
  CHECK_INT(fp_taos_stmt2_get_fields);
694✔
378
  return (*fp_taos_stmt2_get_fields)(stmt, count, fields);
694✔
379
}
380

381
void taos_stmt2_free_fields(TAOS_STMT2 *stmt, TAOS_FIELD_ALL *fields) {
694✔
382
  CHECK_VOID(fp_taos_stmt2_free_fields);
694✔
383
  (*fp_taos_stmt2_free_fields)(stmt, fields);
694✔
384
}
385

386
TAOS_RES *taos_stmt2_result(TAOS_STMT2 *stmt) {
245✔
387
  CHECK_PTR(fp_taos_stmt2_result);
245✔
388
  return (*fp_taos_stmt2_result)(stmt);
245✔
389
}
390

391
char *taos_stmt2_error(TAOS_STMT2 *stmt) {
×
UNCOV
392
  CHECK_PTR(fp_taos_stmt2_error);
×
UNCOV
393
  return (*fp_taos_stmt2_error)(stmt);
×
394
}
395

396
TAOS_RES *taos_query(TAOS *taos, const char *sql) {
654,180,205✔
397
  CHECK_PTR(fp_taos_query);
654,180,205✔
398
  return (*fp_taos_query)(taos, sql);
654,180,205✔
399
}
400

401
TAOS_RES *taos_query_with_reqid(TAOS *taos, const char *sql, int64_t reqId) {
2,644,774✔
402
  CHECK_PTR(fp_taos_query_with_reqid);
2,644,774✔
403
  return (*fp_taos_query_with_reqid)(taos, sql, reqId);
2,644,774✔
404
}
405

406
TAOS_ROW taos_fetch_row(TAOS_RES *res) {
1,353,860,907✔
407
  CHECK_PTR(fp_taos_fetch_row);
1,353,860,907✔
408
  return (*fp_taos_fetch_row)(res);
1,353,860,907✔
409
}
410

411
int taos_result_precision(TAOS_RES *res) {
102,942,124✔
412
  CHECK_INT(fp_taos_result_precision);
102,942,124✔
413
  return (*fp_taos_result_precision)(res);
102,942,124✔
414
}
415

416
void taos_free_result(TAOS_RES *res) {
658,495,775✔
417
  CHECK_VOID(fp_taos_free_result);
658,495,775✔
418
  return (*fp_taos_free_result)(res);
658,495,775✔
419
}
420

421
void taos_kill_query(TAOS *taos) {
1,458✔
422
  CHECK_VOID(fp_taos_kill_query);
1,458✔
423
  return (*fp_taos_kill_query)(taos);
1,458✔
424
}
425

426
int taos_field_count(TAOS_RES *res) {
2,070,171,798✔
427
  CHECK_INT(fp_taos_field_count);
2,070,171,798✔
428
  return (*fp_taos_field_count)(res);
2,070,171,798✔
429
}
430

431
int taos_num_fields(TAOS_RES *res) {
1,161,091,693✔
432
  CHECK_INT(fp_taos_num_fields);
1,161,091,693✔
433
  return (*fp_taos_num_fields)(res);
1,161,091,693✔
434
}
435

436
int taos_affected_rows(TAOS_RES *res) {
510,988,608✔
437
  CHECK_INT(fp_taos_affected_rows);
510,988,608✔
438
  return (*fp_taos_affected_rows)(res);
510,988,608✔
439
}
440

441
int64_t taos_affected_rows64(TAOS_RES *res) {
1,317,095✔
442
  CHECK_INT(fp_taos_affected_rows64);
1,317,095✔
443
  return (*fp_taos_affected_rows64)(res);
1,317,095✔
444
}
445

446
TAOS_FIELD *taos_fetch_fields(TAOS_RES *res) {
181,423,838✔
447
  CHECK_PTR(fp_taos_fetch_fields);
181,423,838✔
448
  return (*fp_taos_fetch_fields)(res);
181,423,838✔
449
}
450

451
TAOS_FIELD_E *taos_fetch_fields_e(TAOS_RES *res) {
1,827✔
452
  CHECK_PTR(fp_taos_fetch_fields_e);
1,827✔
453
  return (*fp_taos_fetch_fields_e)(res);
1,827✔
454
}
455

456
int taos_select_db(TAOS *taos, const char *db) {
168,533✔
457
  CHECK_INT(fp_taos_select_db);
168,533✔
458
  return (*fp_taos_select_db)(taos, db);
168,533✔
459
}
460

461
int taos_print_row(char *str, TAOS_ROW row, TAOS_FIELD *fields, int num_fields) {
81,027,410✔
462
  CHECK_INT(fp_taos_print_row);
81,027,410✔
463
  return (*fp_taos_print_row)(str, row, fields, num_fields);
81,027,410✔
464
}
465

466
int taos_print_row_with_size(char *str, uint32_t size, TAOS_ROW row, TAOS_FIELD *fields, int num_fields) {
80,978,259✔
467
  CHECK_INT(fp_taos_print_row_with_size);
80,978,259✔
468
  return (*fp_taos_print_row_with_size)(str, size, row, fields, num_fields);
80,978,259✔
469
}
470

471
void taos_stop_query(TAOS_RES *res) {
57,577,075✔
472
  CHECK_VOID(fp_taos_stop_query);
57,577,075✔
473
  (*fp_taos_stop_query)(res);
57,577,075✔
474
}
475

UNCOV
476
bool taos_is_null(TAOS_RES *res, int32_t row, int32_t col) {
×
UNCOV
477
  CHECK_BOOL(fp_taos_is_null);
×
UNCOV
478
  return (*fp_taos_is_null)(res, row, col);
×
479
}
480

481
int taos_is_null_by_column(TAOS_RES *res, int columnIndex, bool result[], int *rows) {
336,544,216✔
482
  CHECK_INT(fp_taos_is_null_by_column);
336,544,216✔
483
  return (*fp_taos_is_null_by_column)(res, columnIndex, result, rows);
336,544,216✔
484
}
485

486
bool taos_is_update_query(TAOS_RES *res) {
10,736,814✔
487
  CHECK_BOOL(fp_taos_is_update_query);
10,736,814✔
488
  return (*fp_taos_is_update_query)(res);
10,736,814✔
489
}
490

491
int taos_fetch_block(TAOS_RES *res, TAOS_ROW *rows) {
180,373,715✔
492
  CHECK_INT(fp_taos_fetch_block);
180,373,715✔
493
  return (*fp_taos_fetch_block)(res, rows);
180,373,715✔
494
}
495

UNCOV
496
int taos_fetch_block_s(TAOS_RES *res, int *numOfRows, TAOS_ROW *rows) {
×
UNCOV
497
  CHECK_INT(fp_taos_fetch_block_s);
×
UNCOV
498
  return (*fp_taos_fetch_block_s)(res, numOfRows, rows);
×
499
}
500

501
int taos_fetch_raw_block(TAOS_RES *res, int *numOfRows, void **pData) {
1,561,570✔
502
  CHECK_INT(fp_taos_fetch_raw_block);
1,561,570✔
503
  return (*fp_taos_fetch_raw_block)(res, numOfRows, pData);
1,561,570✔
504
}
505

506
int *taos_get_column_data_offset(TAOS_RES *res, int columnIndex) {
119,043,443✔
507
  CHECK_PTR(fp_taos_get_column_data_offset);
119,043,443✔
508
  return (*fp_taos_get_column_data_offset)(res, columnIndex);
119,043,443✔
509
}
510

511
int taos_validate_sql(TAOS *taos, const char *sql) {
×
UNCOV
512
  CHECK_INT(fp_taos_validate_sql);
×
UNCOV
513
  return (*fp_taos_validate_sql)(taos, sql);
×
514
}
515

UNCOV
516
void taos_reset_current_db(TAOS *taos) {
×
UNCOV
517
  CHECK_VOID(fp_taos_reset_current_db);
×
UNCOV
518
  (*fp_taos_reset_current_db)(taos);
×
519
}
520

521
int *taos_fetch_lengths(TAOS_RES *res) {
1,265,352,817✔
522
  CHECK_PTR(fp_taos_fetch_lengths);
1,265,352,817✔
523
  return (*fp_taos_fetch_lengths)(res);
1,265,352,817✔
524
}
525

UNCOV
526
TAOS_ROW *taos_result_block(TAOS_RES *res) {
×
UNCOV
527
  CHECK_PTR(fp_taos_result_block);
×
UNCOV
528
  return (*fp_taos_result_block)(res);
×
529
}
530

531
const char *taos_get_server_info(TAOS *taos) {
48,792✔
532
  CHECK_PTR(fp_taos_get_server_info);
48,792✔
533
  return (*fp_taos_get_server_info)(taos);
48,792✔
534
}
535

536
const char *taos_get_client_info() {
1,521,897✔
537
  if (fp_taos_get_client_info == NULL) {
1,521,897✔
538
    return td_version;
705,596✔
539
  } else {
540
    return (*fp_taos_get_client_info)();
816,301✔
541
  }
542
}
543

544
int taos_get_current_db(TAOS *taos, char *database, int len, int *required) {
×
545
  CHECK_INT(fp_taos_get_current_db);
×
546
  return (*fp_taos_get_current_db)(taos, database, len, required);
×
547
}
548

549
const char *taos_errstr(TAOS_RES *res) {
21,982,753✔
550
  (void)taos_init();
21,982,753✔
551
  if (fp_taos_errstr == NULL) {
21,982,753✔
UNCOV
552
    return tstrerror(terrno);
×
553
  }
554
  return (*fp_taos_errstr)(res);
21,982,753✔
555
}
556

557
int taos_errno(TAOS_RES *res) {
838,427,471✔
558
  (void)taos_init();
838,427,471✔
559
  if (fp_taos_errno == NULL) {
838,421,035✔
560
    return terrno;
×
561
  }
562
  return (*fp_taos_errno)(res);
838,421,035✔
563
}
564

565
void taos_query_a(TAOS *taos, const char *sql, __taos_async_fn_t fp, void *param) {
34,348✔
566
  CHECK_VOID(fp_taos_query_a);
34,348✔
567
  (*fp_taos_query_a)(taos, sql, fp, param);
34,348✔
568
}
569

UNCOV
570
void taos_query_a_with_reqid(TAOS *taos, const char *sql, __taos_async_fn_t fp, void *param, int64_t reqid) {
×
UNCOV
571
  CHECK_VOID(fp_taos_query_a_with_reqid);
×
UNCOV
572
  (*fp_taos_query_a_with_reqid)(taos, sql, fp, param, reqid);
×
573
}
574

575
void taos_fetch_rows_a(TAOS_RES *res, __taos_async_fn_t fp, void *param) {
9,749,172✔
576
  CHECK_VOID(fp_taos_fetch_rows_a);
9,749,172✔
577
  (*fp_taos_fetch_rows_a)(res, fp, param);
9,749,172✔
578
}
579

580
void taos_fetch_raw_block_a(TAOS_RES *res, __taos_async_fn_t fp, void *param) {
4,087✔
581
  CHECK_VOID(fp_taos_fetch_raw_block_a);
4,087✔
582
  (*fp_taos_fetch_raw_block_a)(res, fp, param);
4,087✔
583
}
584

585
const void *taos_get_raw_block(TAOS_RES *res) {
2,403✔
586
  CHECK_PTR(fp_taos_get_raw_block);
2,403✔
587
  return (*fp_taos_get_raw_block)(res);
2,403✔
588
}
589

UNCOV
590
int taos_get_db_route_info(TAOS *taos, const char *db, TAOS_DB_ROUTE_INFO *dbInfo) {
×
UNCOV
591
  CHECK_INT(fp_taos_get_db_route_info);
×
UNCOV
592
  return (*fp_taos_get_db_route_info)(taos, db, dbInfo);
×
593
}
594

UNCOV
595
int taos_get_table_vgId(TAOS *taos, const char *db, const char *table, int *vgId) {
×
UNCOV
596
  CHECK_INT(fp_taos_get_table_vgId);
×
UNCOV
597
  return (*fp_taos_get_table_vgId)(taos, db, table, vgId);
×
598
}
599

UNCOV
600
int taos_get_tables_vgId(TAOS *taos, const char *db, const char *table[], int tableNum, int *vgId) {
×
UNCOV
601
  CHECK_INT(fp_taos_get_tables_vgId);
×
UNCOV
602
  return (*fp_taos_get_tables_vgId)(taos, db, table, tableNum, vgId);
×
603
}
604

605
int taos_load_table_info(TAOS *taos, const char *tableNameList) {
1,276✔
606
  CHECK_INT(fp_taos_load_table_info);
1,276✔
607
  return (*fp_taos_load_table_info)(taos, tableNameList);
1,276✔
608
}
609

610
void taos_set_hb_quit(int8_t quitByKill) {
815,700✔
611
  if (taos_init() != 0) {
815,700✔
UNCOV
612
    return;
×
613
  }
614

615
  CHECK_VOID(fp_taos_set_hb_quit);
815,700✔
616
  return (*fp_taos_set_hb_quit)(quitByKill);
815,700✔
617
}
618

619
int taos_set_notify_cb(TAOS *taos, __taos_notify_fn_t fp, void *param, int type) {
19,040✔
620
  CHECK_INT(fp_taos_set_notify_cb);
19,040✔
621
  return (*fp_taos_set_notify_cb)(taos, fp, param, type);
19,040✔
622
}
623

624
void taos_fetch_whitelist_a(TAOS *taos, __taos_async_whitelist_fn_t fp, void *param) {
×
625
  CHECK_VOID(fp_taos_fetch_whitelist_a);
×
UNCOV
626
  return (*fp_taos_fetch_whitelist_a)(taos, fp, param);
×
627
}
628

629
void taos_fetch_whitelist_dual_stack_a(TAOS *taos, __taos_async_whitelist_dual_stack_fn_t fp, void *param) {
×
630
  CHECK_VOID(fp_taos_fetch_whitelist_dual_stack_a);
×
UNCOV
631
  return (*fp_taos_fetch_whitelist_dual_stack_a)(taos, fp, param);
×
632
}
633

634
void taos_fetch_ip_whitelist_a(TAOS *taos, __taos_async_ip_whitelist_fn_t fp, void *param) {
×
635
  CHECK_VOID(fp_taos_fetch_ip_whitelist_a);
×
UNCOV
636
  return (*fp_taos_fetch_ip_whitelist_a)(taos, fp, param);
×
637
}
638

UNCOV
639
void taos_fetch_datetime_whitelist_a(TAOS *taos, __taos_async_datetime_whitelist_fn_t fp, void *param) {
×
UNCOV
640
  CHECK_VOID(fp_taos_fetch_datetime_whitelist_a);
×
UNCOV
641
  return (*fp_taos_fetch_datetime_whitelist_a)(taos, fp, param);
×
642
}
643

644
int taos_set_conn_mode(TAOS *taos, int mode, int value) {
4,610✔
645
  CHECK_INT(fp_taos_set_conn_mode);
4,610✔
646
  return (*fp_taos_set_conn_mode)(taos, mode, value);
4,610✔
647
}
648

649
TAOS_RES *taos_schemaless_insert(TAOS *taos, char *lines[], int numLines, int protocol, int precision) {
737,375✔
650
  CHECK_PTR(fp_taos_schemaless_insert);
737,375✔
651
  return (*fp_taos_schemaless_insert)(taos, lines, numLines, protocol, precision);
737,375✔
652
}
653

UNCOV
654
TAOS_RES *taos_schemaless_insert_with_reqid(TAOS *taos, char *lines[], int numLines, int protocol, int precision,
×
655
                                            int64_t reqid) {
UNCOV
656
  CHECK_PTR(fp_taos_schemaless_insert_with_reqid);
×
657
  return (*fp_taos_schemaless_insert_with_reqid)(taos, lines, numLines, protocol, precision, reqid);
×
658
}
659

660
TAOS_RES *taos_schemaless_insert_raw(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol,
717✔
661
                                     int precision) {
662
  CHECK_PTR(fp_taos_schemaless_insert_raw);
717✔
663
  return (*fp_taos_schemaless_insert_raw)(taos, lines, len, totalRows, protocol, precision);
717✔
664
}
665

666
TAOS_RES *taos_schemaless_insert_raw_with_reqid(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol,
956✔
667
                                                int precision, int64_t reqid) {
668
  CHECK_PTR(fp_taos_schemaless_insert_raw_with_reqid);
956✔
669
  return (*fp_taos_schemaless_insert_raw_with_reqid)(taos, lines, len, totalRows, protocol, precision, reqid);
956✔
670
}
671

672
TAOS_RES *taos_schemaless_insert_ttl(TAOS *taos, char *lines[], int numLines, int protocol, int precision,
×
673
                                     int32_t ttl) {
674
  CHECK_PTR(fp_taos_schemaless_insert_ttl);
×
UNCOV
675
  return (*fp_taos_schemaless_insert_ttl)(taos, lines, numLines, protocol, precision, ttl);
×
676
}
677

678
TAOS_RES *taos_schemaless_insert_ttl_with_reqid(TAOS *taos, char *lines[], int numLines, int protocol, int precision,
293,100✔
679
                                                int32_t ttl, int64_t reqid) {
680
  CHECK_PTR(fp_taos_schemaless_insert_ttl_with_reqid);
293,100✔
681
  return (*fp_taos_schemaless_insert_ttl_with_reqid)(taos, lines, numLines, protocol, precision, ttl, reqid);
293,100✔
682
}
683

UNCOV
684
TAOS_RES *taos_schemaless_insert_raw_ttl(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol,
×
685
                                         int precision, int32_t ttl) {
UNCOV
686
  CHECK_PTR(fp_taos_schemaless_insert_raw_ttl);
×
687
  return (*fp_taos_schemaless_insert_raw_ttl)(taos, lines, len, totalRows, protocol, precision, ttl);
×
688
}
689

690
TAOS_RES *taos_schemaless_insert_raw_ttl_with_reqid(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol,
3,121✔
691
                                                    int precision, int32_t ttl, int64_t reqid) {
692
  CHECK_PTR(fp_taos_schemaless_insert_raw_ttl_with_reqid);
3,121✔
693
  return (*fp_taos_schemaless_insert_raw_ttl_with_reqid)(taos, lines, len, totalRows, protocol, precision, ttl, reqid);
3,121✔
694
}
695

UNCOV
696
TAOS_RES *taos_schemaless_insert_raw_ttl_with_reqid_tbname_key(TAOS *taos, char *lines, int len, int32_t *totalRows,
×
697
                                                               int protocol, int precision, int32_t ttl, int64_t reqid,
698
                                                               char *tbnameKey) {
UNCOV
699
  CHECK_PTR(fp_taos_schemaless_insert_raw_ttl_with_reqid_tbname_key);
×
UNCOV
700
  return (*fp_taos_schemaless_insert_raw_ttl_with_reqid_tbname_key)(taos, lines, len, totalRows, protocol, precision,
×
701
                                                                    ttl, reqid, tbnameKey);
702
}
703

704
TAOS_RES *taos_schemaless_insert_ttl_with_reqid_tbname_key(TAOS *taos, char *lines[], int numLines, int protocol,
293,052✔
705
                                                           int precision, int32_t ttl, int64_t reqid, char *tbnameKey) {
706
  CHECK_PTR(fp_taos_schemaless_insert_ttl_with_reqid_tbname_key);
293,052✔
707
  return (*fp_taos_schemaless_insert_ttl_with_reqid_tbname_key)(taos, lines, numLines, protocol, precision, ttl, reqid,
293,052✔
708
                                                                tbnameKey);
709
}
710

711
tmq_conf_t *tmq_conf_new() {
27,426✔
712
  (void)taos_init();
27,426✔
713
  CHECK_PTR(fp_tmq_conf_new);
27,426✔
714
  return (*fp_tmq_conf_new)();
27,426✔
715
}
716

717
tmq_conf_res_t tmq_conf_set(tmq_conf_t *conf, const char *key, const char *value) {
178,331✔
718
  CHECK_INT(fp_tmq_conf_set);
178,331✔
719
  return (*fp_tmq_conf_set)(conf, key, value);
178,331✔
720
}
721

722
void tmq_conf_destroy(tmq_conf_t *conf) {
27,426✔
723
  CHECK_VOID(fp_tmq_conf_destroy);
27,426✔
724
  (*fp_tmq_conf_destroy)(conf);
27,426✔
725
}
726

727
void tmq_conf_set_auto_commit_cb(tmq_conf_t *conf, tmq_commit_cb *cb, void *param) {
564✔
728
  CHECK_VOID(fp_tmq_conf_set_auto_commit_cb);
564✔
729
  (*fp_tmq_conf_set_auto_commit_cb)(conf, cb, param);
564✔
730
}
731

732
tmq_list_t *tmq_list_new() {
33,855✔
733
  (void)taos_init();
33,855✔
734
  CHECK_PTR(fp_tmq_list_new);
33,855✔
735
  return (*fp_tmq_list_new)();
33,855✔
736
}
737

738
int32_t tmq_list_append(tmq_list_t *tlist, const char *val) {
28,606✔
739
  CHECK_INT(fp_tmq_list_append);
28,606✔
740
  return (*fp_tmq_list_append)(tlist, val);
28,606✔
741
}
742

743
void tmq_list_destroy(tmq_list_t *tlist) {
34,083✔
744
  CHECK_VOID(fp_tmq_list_destroy);
34,083✔
745
  (*fp_tmq_list_destroy)(tlist);
34,083✔
746
}
747

748
int32_t tmq_list_get_size(const tmq_list_t *tlist) {
2,026✔
749
  CHECK_INT(fp_tmq_list_get_size);
2,026✔
750
  return (*fp_tmq_list_get_size)(tlist);
2,026✔
751
}
752

753
char **tmq_list_to_c_array(const tmq_list_t *tlist) {
2,026✔
754
  CHECK_PTR(fp_tmq_list_to_c_array);
2,026✔
755
  return (*fp_tmq_list_to_c_array)(tlist);
2,026✔
756
}
757

758
tmq_t *tmq_consumer_new(tmq_conf_t *conf, char *errstr, int32_t errstrLen) {
27,426✔
759
  (void)taos_init();
27,426✔
760
  CHECK_PTR(fp_tmq_consumer_new);
27,426✔
761
  return (*fp_tmq_consumer_new)(conf, errstr, errstrLen);
27,426✔
762
}
763

764
int32_t tmq_subscribe(tmq_t *tmq, const tmq_list_t *topic_list) {
32,057✔
765
  CHECK_INT(fp_tmq_subscribe);
32,057✔
766
  return (*fp_tmq_subscribe)(tmq, topic_list);
32,057✔
767
}
768

769
int32_t tmq_unsubscribe(tmq_t *tmq) {
20,558✔
770
  CHECK_INT(fp_tmq_unsubscribe);
20,558✔
771
  return (*fp_tmq_unsubscribe)(tmq);
20,558✔
772
}
773

774
int32_t tmq_subscription(tmq_t *tmq, tmq_list_t **topics) {
2,026✔
775
  CHECK_INT(fp_tmq_subscription);
2,026✔
776
  return (*fp_tmq_subscription)(tmq, topics);
2,026✔
777
}
778

779
TAOS_RES *tmq_consumer_poll(tmq_t *tmq, int64_t timeout) {
519,824✔
780
  CHECK_PTR(fp_tmq_consumer_poll);
519,824✔
781
  return (*fp_tmq_consumer_poll)(tmq, timeout);
519,824✔
782
}
783

784
int32_t tmq_consumer_close(tmq_t *tmq) {
28,374✔
785
  CHECK_INT(fp_tmq_consumer_close);
28,374✔
786
  return (*fp_tmq_consumer_close)(tmq);
28,374✔
787
}
788

789
int32_t tmq_commit_sync(tmq_t *tmq, const TAOS_RES *msg) {
31,761✔
790
  CHECK_INT(fp_tmq_commit_sync);
31,761✔
791
  return (*fp_tmq_commit_sync)(tmq, msg);
31,761✔
792
}
793

UNCOV
794
void tmq_commit_async(tmq_t *tmq, const TAOS_RES *msg, tmq_commit_cb *cb, void *param) {
×
UNCOV
795
  CHECK_VOID(fp_tmq_commit_async);
×
UNCOV
796
  (*fp_tmq_commit_async)(tmq, msg, cb, param);
×
797
}
798

799
int32_t tmq_commit_offset_sync(tmq_t *tmq, const char *pTopicName, int32_t vgId, int64_t offset) {
829✔
800
  CHECK_INT(fp_tmq_commit_offset_sync);
829✔
801
  return (*fp_tmq_commit_offset_sync)(tmq, pTopicName, vgId, offset);
829✔
802
}
803

UNCOV
804
void tmq_commit_offset_async(tmq_t *tmq, const char *pTopicName, int32_t vgId, int64_t offset, tmq_commit_cb *cb,
×
805
                             void *param) {
UNCOV
806
  CHECK_VOID(fp_tmq_commit_offset_async);
×
UNCOV
807
  (*fp_tmq_commit_offset_async)(tmq, pTopicName, vgId, offset, cb, param);
×
808
}
809

810
int32_t tmq_get_topic_assignment(tmq_t *tmq, const char *pTopicName, tmq_topic_assignment **assignment,
3,087✔
811
                                 int32_t *numOfAssignment) {
812
  CHECK_INT(fp_tmq_get_topic_assignment);
3,087✔
813
  return (*fp_tmq_get_topic_assignment)(tmq, pTopicName, assignment, numOfAssignment);
3,087✔
814
}
815

816
void tmq_free_assignment(tmq_topic_assignment *pAssignment) {
1,689✔
817
  CHECK_VOID(fp_tmq_free_assignment);
1,689✔
818
  (*fp_tmq_free_assignment)(pAssignment);
1,689✔
819
}
820

821
int32_t tmq_offset_seek(tmq_t *tmq, const char *pTopicName, int32_t vgId, int64_t offset) {
3,531✔
822
  CHECK_INT(fp_tmq_offset_seek);
3,531✔
823
  return (*fp_tmq_offset_seek)(tmq, pTopicName, vgId, offset);
3,531✔
824
}
825

826
int64_t tmq_position(tmq_t *tmq, const char *pTopicName, int32_t vgId) {
660✔
827
  CHECK_INT(fp_tmq_position);
660✔
828
  return (*fp_tmq_position)(tmq, pTopicName, vgId);
660✔
829
}
830

831
int64_t tmq_committed(tmq_t *tmq, const char *pTopicName, int32_t vgId) {
770✔
832
  CHECK_INT(fp_tmq_committed);
770✔
833
  return (*fp_tmq_committed)(tmq, pTopicName, vgId);
770✔
834
}
835

UNCOV
836
TAOS *tmq_get_connect(tmq_t *tmq) {
×
837
  CHECK_PTR(fp_tmq_get_connect);
×
UNCOV
838
  return (*fp_tmq_get_connect)(tmq);
×
839
}
840

841
const char *tmq_get_table_name(TAOS_RES *res) {
83,730,169✔
842
  CHECK_PTR(fp_tmq_get_table_name);
83,730,169✔
843
  return (*fp_tmq_get_table_name)(res);
83,730,169✔
844
}
845

846
tmq_res_t tmq_get_res_type(TAOS_RES *res) {
354,632✔
847
  CHECK_INT(fp_tmq_get_res_type);
354,632✔
848
  return (*fp_tmq_get_res_type)(res);
354,632✔
849
}
850

851
const char *tmq_get_topic_name(TAOS_RES *res) {
89,060✔
852
  CHECK_PTR(fp_tmq_get_topic_name);
89,060✔
853
  return (*fp_tmq_get_topic_name)(res);
89,060✔
854
}
855

856
const char *tmq_get_db_name(TAOS_RES *res) {
87,266✔
857
  CHECK_PTR(fp_tmq_get_db_name);
87,266✔
858
  return (*fp_tmq_get_db_name)(res);
87,266✔
859
}
860

861
int32_t tmq_get_vgroup_id(TAOS_RES *res) {
89,060✔
862
  CHECK_INT(fp_tmq_get_vgroup_id);
89,060✔
863
  return (*fp_tmq_get_vgroup_id)(res);
89,060✔
864
}
865

866
int64_t tmq_get_vgroup_offset(TAOS_RES *res) {
210,488✔
867
  CHECK_INT(fp_tmq_get_vgroup_offset);
210,488✔
868
  return (*fp_tmq_get_vgroup_offset)(res);
210,488✔
869
}
870

871
const char *tmq_err2str(int32_t code) {
3,435✔
872
  CHECK_PTR(fp_tmq_err2str);
3,435✔
873
  return (*fp_tmq_err2str)(code);
3,435✔
874
}
875

876
int32_t tmq_get_raw(TAOS_RES *res, tmq_raw_data *raw) {
1,564✔
877
  CHECK_INT(fp_tmq_get_raw);
1,564✔
878
  return (*fp_tmq_get_raw)(res, raw);
1,564✔
879
}
880

UNCOV
881
int32_t tmq_write_raw(TAOS *taos, tmq_raw_data raw) {
×
UNCOV
882
  CHECK_INT(fp_tmq_write_raw);
×
UNCOV
883
  return (*fp_tmq_write_raw)(taos, raw);
×
884
}
885

UNCOV
886
int taos_write_raw_block(TAOS *taos, int numOfRows, char *pData, const char *tbname) {
×
UNCOV
887
  CHECK_INT(fp_taos_write_raw_block);
×
UNCOV
888
  return (*fp_taos_write_raw_block)(taos, numOfRows, pData, tbname);
×
889
}
890

UNCOV
891
int taos_write_raw_block_with_reqid(TAOS *taos, int numOfRows, char *pData, const char *tbname, int64_t reqid) {
×
UNCOV
892
  CHECK_INT(fp_taos_write_raw_block_with_reqid);
×
UNCOV
893
  return (*fp_taos_write_raw_block_with_reqid)(taos, numOfRows, pData, tbname, reqid);
×
894
}
895

UNCOV
896
int taos_write_raw_block_with_fields(TAOS *taos, int rows, char *pData, const char *tbname, TAOS_FIELD *fields,
×
897
                                     int numFields) {
UNCOV
898
  CHECK_INT(fp_taos_write_raw_block_with_fields);
×
UNCOV
899
  return (*fp_taos_write_raw_block_with_fields)(taos, rows, pData, tbname, fields, numFields);
×
900
}
901

UNCOV
902
int taos_write_raw_block_with_fields_with_reqid(TAOS *taos, int rows, char *pData, const char *tbname,
×
903
                                                TAOS_FIELD *fields, int numFields, int64_t reqid) {
UNCOV
904
  CHECK_INT(fp_taos_write_raw_block_with_fields_with_reqid);
×
UNCOV
905
  return (*fp_taos_write_raw_block_with_fields_with_reqid)(taos, rows, pData, tbname, fields, numFields, reqid);
×
906
}
907

UNCOV
908
void tmq_free_raw(tmq_raw_data raw) {
×
UNCOV
909
  CHECK_VOID(fp_tmq_free_raw);
×
UNCOV
910
  (*fp_tmq_free_raw)(raw);
×
911
}
912

913
char *tmq_get_json_meta(TAOS_RES *res) {
420✔
914
  CHECK_PTR(fp_tmq_get_json_meta);
420✔
915
  return (*fp_tmq_get_json_meta)(res);
420✔
916
}
917

918
void tmq_free_json_meta(char *jsonMeta) {
420✔
919
  CHECK_VOID(fp_tmq_free_json_meta);
420✔
920
  return (*fp_tmq_free_json_meta)(jsonMeta);
420✔
921
}
922

923
TSDB_SERVER_STATUS taos_check_server_status(const char *fqdn, int port, char *details, int maxlen) {
1,275✔
924
  CHECK_INT(fp_taos_check_server_status);
1,275✔
925
  return (*fp_taos_check_server_status)(fqdn, port, details, maxlen);
1,275✔
926
}
927

UNCOV
928
void taos_write_crashinfo(int signum, void *sigInfo, void *context) {
×
929
  (void)taos_init();
×
UNCOV
930
  CHECK_VOID(fp_taos_write_crashinfo);
×
931
  (*fp_taos_write_crashinfo)(signum, sigInfo, context);
×
932
}
933

UNCOV
934
char *getBuildInfo() {
×
935
  (void)taos_init();
×
UNCOV
936
  CHECK_PTR(fp_getBuildInfo);
×
937
  return (*fp_getBuildInfo)();
×
938
}
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