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

taosdata / TDengine / #5071

17 May 2026 01:15AM UTC coverage: 63.054% (-10.3%) from 73.326%
#5071

push

travis-ci

web-flow
feat (TDgpt): Dynamic Model Synchronization Enhancements (#35344)

* refactor: do some internal refactor.

* fix: fix multiprocess sync issue.

* feat: add dynamic anomaly detection and forecasting services

* fix: log error message for undeploying model in exception handling

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix: handle undeploy when model exists only on disk

Agent-Logs-Url: https://github.com/taosdata/TDengine/sessions/286aafa0-c3ce-4c27-b803-2707571e9dc1

Co-authored-by: hjxilinx <8252296+hjxilinx@users.noreply.github.com>

* fix: guard dynamic registry concurrent access

Agent-Logs-Url: https://github.com/taosdata/TDengine/sessions/5e4db858-6458-40f4-ac28-d1b1b7f97c18

Co-authored-by: hjxilinx <8252296+hjxilinx@users.noreply.github.com>

* fix: tighten service list locking scope

Agent-Logs-Url: https://github.com/taosdata/TDengine/sessions/5e4db858-6458-40f4-ac28-d1b1b7f97c18

Co-authored-by: hjxilinx <8252296+hjxilinx@users.noreply.github.com>

* fix: restore prophet support and update tests per review feedback

Agent-Logs-Url: https://github.com/taosdata/TDengine/sessions/92298ae1-7da6-4d07-b20e-101c7cd0b26b

Co-authored-by: hjxilinx <8252296+hjxilinx@users.noreply.github.com>

* fix: improve test name and move copy inside lock scope

Agent-Logs-Url: https://github.com/taosdata/TDengine/sessions/92298ae1-7da6-4d07-b20e-101c7cd0b26b

Co-authored-by: hjxilinx <8252296+hjxilinx@users.noreply.github.com>

* Potential fix for pull request finding

Co-au... (continued)

238317 of 377957 relevant lines covered (63.05%)

130539817.12 hits per line

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

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

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

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

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

104
  tsDriverOnceRet = 0;
1,535,808✔
105
}
106

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

116
int taos_init(void) {
1,584,191,824✔
117
  (void)taosThreadOnce(&tsDriverEnvOnce, taos_init_driver_env);
1,584,191,824✔
118
  (void)taosThreadOnce(&tsDriverOnce, taos_init_driver);
1,584,194,207✔
119
  (void)taosThreadOnce(&tsInitOnce, taos_init_wrapper);
1,584,194,598✔
120
  return tsInitOnceRet;
1,584,190,862✔
121
}
122

123
void taos_cleanup(void) {
1,088,769✔
124
  CHECK_VOID(fp_taos_cleanup);
1,088,769✔
125
  (*fp_taos_cleanup)();
1,088,769✔
126
}
127

128
int taos_options(TSDB_OPTION option, const void *arg, ...) {
96,812,197✔
129
  (void)taosThreadOnce(&tsDriverEnvOnce, taos_init_driver_env);
96,812,197✔
130
  if (option == TSDB_OPTION_DRIVER) {
96,812,464✔
131
    if (tsDriver == NULL) {
1,086,899✔
132
      if (strcasecmp((const char *)arg, STR_NATIVE) == 0) {
1,086,899✔
133
        tsDriverType = DRIVER_NATIVE;
1,086,899✔
134
        return 0;
1,086,899✔
135
      }
136
      if (strcasecmp((const char *)arg, STR_WEBSOCKET) == 0) {
×
137
        tsDriverType = DRIVER_WEBSOCKET;
×
138
        return 0;
×
139
      }
140
    }
141
    terrno = TSDB_CODE_REPEAT_INIT;
×
142
    return -1;
×
143
  }
144
  (void)taosThreadOnce(&tsDriverOnce, taos_init_driver);
95,725,565✔
145

146
  CHECK_INT(fp_taos_options);
95,725,565✔
147
  return (*fp_taos_options)(option, arg);
95,725,565✔
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) {
97,116,864✔
156
  if (taos_init() != 0) {
97,116,864✔
157
    //terrno = TSDB_CODE_DLL_NOT_LOAD;
158
    return NULL;
×
159
  }
160

161
  CHECK_PTR(fp_taos_connect);
97,117,211✔
162
  return (*fp_taos_connect)(ip, user, pass, db, port);
97,117,211✔
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) {
×
166
  if (taos_init() != 0) {
×
167
    terrno = TSDB_CODE_DLL_NOT_LOAD;
×
168
    return NULL;
×
169
  }
170

171
  CHECK_PTR(fp_taos_connect_totp);
×
172
  return (*fp_taos_connect_totp)(ip, user, pass, totp, db, port);
×
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) {
×
189
  if (taos_init() != 0) {
×
190
    terrno = TSDB_CODE_DLL_NOT_LOAD;
×
191
    return NULL;
×
192
  }
193

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

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

204
  CHECK_PTR(fp_taos_connect_auth);
×
205
  return (*fp_taos_connect_auth)(ip, user, auth, db, port);
×
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) {
×
227
  if (taos_init() != 0) {
×
228
    return NULL;
×
229
  }
230

231
  CHECK_PTR(fp_taos_connect_with_dsn);
×
232
  return (*fp_taos_connect_with_dsn)(dsn);
×
233
}
234

235
void taos_close(TAOS *taos) {
96,981,059✔
236
  CHECK_VOID(fp_taos_close);
96,981,059✔
237
  (*fp_taos_close)(taos);
96,981,059✔
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) {
26,355✔
247
  CHECK_PTR(fp_taos_stmt_init);
26,355✔
248
  return (*fp_taos_stmt_init)(taos);
26,355✔
249
}
250

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

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

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

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

271
int taos_stmt_set_tbname(TAOS_STMT *stmt, const char *name) {
7,772,947✔
272
  CHECK_INT(fp_taos_stmt_set_tbname);
7,772,947✔
273
  return (*fp_taos_stmt_set_tbname)(stmt, name);
7,772,947✔
274
}
275

276
int taos_stmt_set_tags(TAOS_STMT *stmt, TAOS_MULTI_BIND *tags) {
×
277
  CHECK_INT(fp_taos_stmt_set_tags);
×
278
  return (*fp_taos_stmt_set_tags)(stmt, tags);
×
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) {
33,449✔
317
  CHECK_INT(fp_taos_stmt_bind_param);
33,449✔
318
  return (*fp_taos_stmt_bind_param)(stmt, bind);
33,449✔
319
}
320

321
int taos_stmt_bind_param_batch(TAOS_STMT *stmt, TAOS_MULTI_BIND *bind) {
7,777,247✔
322
  CHECK_INT(fp_taos_stmt_bind_param_batch);
7,777,247✔
323
  return (*fp_taos_stmt_bind_param_batch)(stmt, bind);
7,777,247✔
324
}
325

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

331
int taos_stmt_add_batch(TAOS_STMT *stmt) {
7,803,977✔
332
  CHECK_INT(fp_taos_stmt_add_batch);
7,803,977✔
333
  return (*fp_taos_stmt_add_batch)(stmt);
7,803,977✔
334
}
335

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

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

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

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

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

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

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

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

376
int taos_stmt2_bind_param(TAOS_STMT2 *stmt, TAOS_STMT2_BINDV *bindv, int32_t col_idx) {
16,728✔
377
  CHECK_INT(fp_taos_stmt2_bind_param);
16,728✔
378
  return (*fp_taos_stmt2_bind_param)(stmt, bindv, col_idx);
16,728✔
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) {
17,168✔
388
  CHECK_INT(fp_taos_stmt2_exec);
17,168✔
389
  return (*fp_taos_stmt2_exec)(stmt, affected_rows);
17,168✔
390
}
391

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

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

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

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

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

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

422
TAOS_RES *taos_query(TAOS *taos, const char *sql) {
932,136,321✔
423
  CHECK_PTR(fp_taos_query);
932,136,321✔
424
  return (*fp_taos_query)(taos, sql);
932,136,321✔
425
}
426

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

432
TAOS_ROW taos_fetch_row(TAOS_RES *res) {
1,429,201,931✔
433
  CHECK_PTR(fp_taos_fetch_row);
1,429,201,931✔
434
  return (*fp_taos_fetch_row)(res);
1,429,201,931✔
435
}
436

437
int taos_result_precision(TAOS_RES *res) {
290,021,585✔
438
  CHECK_INT(fp_taos_result_precision);
290,021,585✔
439
  return (*fp_taos_result_precision)(res);
290,021,585✔
440
}
441

442
void taos_free_result(TAOS_RES *res) {
956,266,324✔
443
  CHECK_VOID(fp_taos_free_result);
956,266,324✔
444
  return (*fp_taos_free_result)(res);
956,266,324✔
445
}
446

447
void taos_kill_query(TAOS *taos) {
×
448
  CHECK_VOID(fp_taos_kill_query);
×
449
  return (*fp_taos_kill_query)(taos);
×
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) {
1,676,645,377✔
458
  CHECK_INT(fp_taos_num_fields);
1,676,645,377✔
459
  return (*fp_taos_num_fields)(res);
1,676,645,377✔
460
}
461

462
int taos_affected_rows(TAOS_RES *res) {
584,850,358✔
463
  CHECK_INT(fp_taos_affected_rows);
584,850,358✔
464
  return (*fp_taos_affected_rows)(res);
584,850,358✔
465
}
466

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

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

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

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

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

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

497
void taos_stop_query(TAOS_RES *res) {
126,589,698✔
498
  CHECK_VOID(fp_taos_stop_query);
126,589,698✔
499
  (*fp_taos_stop_query)(res);
126,589,698✔
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) {
871,404,750✔
508
  CHECK_INT(fp_taos_is_null_by_column);
871,404,750✔
509
  return (*fp_taos_is_null_by_column)(res, columnIndex, result, rows);
871,404,750✔
510
}
511

512
bool taos_is_update_query(TAOS_RES *res) {
×
513
  CHECK_BOOL(fp_taos_is_update_query);
×
514
  return (*fp_taos_is_update_query)(res);
×
515
}
516

517
int taos_fetch_block(TAOS_RES *res, TAOS_ROW *rows) {
354,712,042✔
518
  CHECK_INT(fp_taos_fetch_block);
354,712,042✔
519
  return (*fp_taos_fetch_block)(res, rows);
354,712,042✔
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) {
×
528
  CHECK_INT(fp_taos_fetch_raw_block);
×
529
  return (*fp_taos_fetch_raw_block)(res, numOfRows, pData);
×
530
}
531

532
int *taos_get_column_data_offset(TAOS_RES *res, int columnIndex) {
257,703,887✔
533
  CHECK_PTR(fp_taos_get_column_data_offset);
257,703,887✔
534
  return (*fp_taos_get_column_data_offset)(res, columnIndex);
257,703,887✔
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,428,531,550✔
548
  CHECK_PTR(fp_taos_fetch_lengths);
1,428,531,550✔
549
  return (*fp_taos_fetch_lengths)(res);
1,428,531,550✔
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) {
×
558
  CHECK_PTR(fp_taos_get_server_info);
×
559
  return (*fp_taos_get_server_info)(taos);
×
560
}
561

562
const char *taos_get_client_info() {
1,584,247✔
563
  if (fp_taos_get_client_info == NULL) {
1,584,247✔
564
    return td_version;
523,352✔
565
  } else {
566
    return (*fp_taos_get_client_info)();
1,060,895✔
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) {
114,700,828✔
581
  (void)taos_init();
114,700,828✔
582
  if (fp_taos_errstr == NULL) {
114,701,096✔
583
    return tstrerror(terrno);
×
584
  }
585
  return (*fp_taos_errstr)(res);
114,701,096✔
586
}
587

588
int taos_errno(TAOS_RES *res) {
1,368,727,722✔
589
  (void)taos_init();
1,368,727,722✔
590
  if (fp_taos_errno == NULL) {
1,368,725,458✔
591
    return terrno;
×
592
  }
593
  return (*fp_taos_errno)(res);
1,368,725,458✔
594
}
595

596
void taos_query_a(TAOS *taos, const char *sql, __taos_async_fn_t fp, void *param) {
×
597
  CHECK_VOID(fp_taos_query_a);
×
598
  (*fp_taos_query_a)(taos, sql, fp, param);
×
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) {
89,986,094✔
607
  CHECK_VOID(fp_taos_fetch_rows_a);
89,986,094✔
608
  (*fp_taos_fetch_rows_a)(res, fp, param);
89,986,094✔
609
}
610

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

616
const void *taos_get_raw_block(TAOS_RES *res) {
×
617
  CHECK_PTR(fp_taos_get_raw_block);
×
618
  return (*fp_taos_get_raw_block)(res);
×
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,306✔
637
  CHECK_INT(fp_taos_load_table_info);
1,306✔
638
  return (*fp_taos_load_table_info)(taos, tableNameList);
1,306✔
639
}
640

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

646
  CHECK_VOID(fp_taos_set_hb_quit);
1,060,895✔
647
  return (*fp_taos_set_hb_quit)(quitByKill);
1,060,895✔
648
}
649

650
int taos_set_notify_cb(TAOS *taos, __taos_notify_fn_t fp, void *param, int type) {
×
651
  CHECK_INT(fp_taos_set_notify_cb);
×
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,292✔
676
  CHECK_INT(fp_taos_set_conn_mode);
2,292✔
677
  return (*fp_taos_set_conn_mode)(taos, mode, value);
2,292✔
678
}
679

680
TAOS_RES *taos_schemaless_insert(TAOS *taos, char *lines[], int numLines, int protocol, int precision) {
463,692✔
681
  CHECK_PTR(fp_taos_schemaless_insert);
463,692✔
682
  return (*fp_taos_schemaless_insert)(taos, lines, numLines, protocol, precision);
463,692✔
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,
×
692
                                     int precision) {
693
  CHECK_PTR(fp_taos_schemaless_insert_raw);
×
694
  return (*fp_taos_schemaless_insert_raw)(taos, lines, len, totalRows, protocol, precision);
×
695
}
696

697
TAOS_RES *taos_schemaless_insert_raw_with_reqid(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol,
×
698
                                                int precision, int64_t reqid) {
699
  CHECK_PTR(fp_taos_schemaless_insert_raw_with_reqid);
×
700
  return (*fp_taos_schemaless_insert_raw_with_reqid)(taos, lines, len, totalRows, protocol, precision, reqid);
×
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,
14,789✔
710
                                                int32_t ttl, int64_t reqid) {
711
  CHECK_PTR(fp_taos_schemaless_insert_ttl_with_reqid);
14,789✔
712
  return (*fp_taos_schemaless_insert_ttl_with_reqid)(taos, lines, numLines, protocol, precision, ttl, reqid);
14,789✔
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,
×
722
                                                    int precision, int32_t ttl, int64_t reqid) {
723
  CHECK_PTR(fp_taos_schemaless_insert_raw_ttl_with_reqid);
×
724
  return (*fp_taos_schemaless_insert_raw_ttl_with_reqid)(taos, lines, len, totalRows, protocol, precision, ttl, reqid);
×
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,
14,789✔
736
                                                           int precision, int32_t ttl, int64_t reqid, char *tbnameKey) {
737
  CHECK_PTR(fp_taos_schemaless_insert_ttl_with_reqid_tbname_key);
14,789✔
738
  return (*fp_taos_schemaless_insert_ttl_with_reqid_tbname_key)(taos, lines, numLines, protocol, precision, ttl, reqid,
14,789✔
739
                                                                tbnameKey);
740
}
741

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

820
int32_t tmq_commit_sync(tmq_t *tmq, const TAOS_RES *msg) {
2,988✔
821
  CHECK_INT(fp_tmq_commit_sync);
2,988✔
822
  return (*fp_tmq_commit_sync)(tmq, msg);
2,988✔
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) {
×
831
  CHECK_INT(fp_tmq_commit_offset_sync);
×
832
  return (*fp_tmq_commit_offset_sync)(tmq, pTopicName, vgId, offset);
×
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,
61✔
842
                                 int32_t *numOfAssignment) {
843
  CHECK_INT(fp_tmq_get_topic_assignment);
61✔
844
  return (*fp_tmq_get_topic_assignment)(tmq, pTopicName, assignment, numOfAssignment);
61✔
845
}
846

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

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

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

862
int64_t tmq_committed(tmq_t *tmq, const char *pTopicName, int32_t vgId) {
×
863
  CHECK_INT(fp_tmq_committed);
×
864
  return (*fp_tmq_committed)(tmq, pTopicName, vgId);
×
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) {
338,581✔
873
  CHECK_PTR(fp_tmq_get_table_name);
338,581✔
874
  return (*fp_tmq_get_table_name)(res);
338,581✔
875
}
876

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

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

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

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

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

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

907
int32_t tmq_get_raw(TAOS_RES *res, tmq_raw_data *raw) {
×
908
  CHECK_INT(fp_tmq_get_raw);
×
909
  return (*fp_tmq_get_raw)(res, raw);
×
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) {
2,328✔
945
  CHECK_PTR(fp_tmq_get_json_meta);
2,328✔
946
  return (*fp_tmq_get_json_meta)(res);
2,328✔
947
}
948

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

954
TSDB_SERVER_STATUS taos_check_server_status(const char *fqdn, int port, char *details, int maxlen) {
×
955
  CHECK_INT(fp_taos_check_server_status);
×
956
  return (*fp_taos_check_server_status)(fqdn, port, details, maxlen);
×
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