docs: taos api description
This commit is contained in:
parent
72cce0825b
commit
c3e8814308
|
@ -256,6 +256,12 @@ int taos_print_row(char *str, TAOS_ROW row, TAOS_FIELD *fields, int num_fields)
|
|||
|
||||
:::
|
||||
|
||||
- `TAOS *taos_connect_auth(const char *host, const char *user, const char *auth, const char *db, uint16_t port)`
|
||||
|
||||
功能同 taos_connect。除 pass 参数替换为 auth 外,其他参数同 taos_connect
|
||||
|
||||
- auth: 密码取 32 位小写 md5. e.g. 默认密码 taosdata 取 md5 为 dcc5bed04851fec854c035b2e40263b6
|
||||
|
||||
- `char *taos_get_server_info(TAOS *taos)`
|
||||
|
||||
获取服务端版本信息。
|
||||
|
@ -272,6 +278,14 @@ int taos_print_row(char *str, TAOS_ROW row, TAOS_FIELD *fields, int num_fields)
|
|||
- 如果,len 小于 存储db需要的空间(包含最后的'\0'),返回错误,database里赋值截断的数据,以'\0'结尾。
|
||||
- 如果,len 大于等于 存储db需要的空间(包含最后的'\0'),返回正常0,database里赋值以'\0‘结尾的db名。
|
||||
|
||||
- `int taos_set_notify_cb(TAOS *taos, __taos_notify_fn_t fp, void *param, int type)`
|
||||
|
||||
设置事件通知回调函数。
|
||||
|
||||
- fp 事件通知回调函数指针。函数声明:typedef void (*__taos_notify_fn_t)(void *param, void *ext, int type);其中, param 为用户自定义参数,ext 为扩展参数(依赖事件通知类型,针对TAOS_NOTIFY_PASSVER 返回用户密码版本),type 为事件通知类型。
|
||||
- param 用户自定义参数。
|
||||
- type 事件通知类型。取值:1)TAOS_NOTIFY_PASSVER: 用户密码改变。
|
||||
|
||||
- `void taos_close(TAOS *taos)`
|
||||
|
||||
关闭连接,其中`taos`是 `taos_connect()` 返回的句柄。
|
||||
|
@ -447,6 +461,14 @@ TDengine 的异步 API 均采用非阻塞调用模式。应用程序可以用多
|
|||
|
||||
执行准备好的语句。目前,一条语句只能执行一次。
|
||||
|
||||
- `int taos_stmt_affected_rows(TAOS_STMT *stmt)`
|
||||
|
||||
获取被所执行的 SQL 语句影响的行数。
|
||||
|
||||
- `int taos_stmt_affected_rows_once(TAOS_STMT *stmt)`
|
||||
|
||||
获取被所执行的 SQL 语句影响的行数。
|
||||
|
||||
- `TAOS_RES* taos_stmt_use_result(TAOS_STMT *stmt)`
|
||||
|
||||
获取语句的结果集。结果集的使用方式与非参数化调用时一致,使用完成后,应对此结果集调用 `taos_free_result()` 以释放资源。
|
||||
|
|
Loading…
Reference in New Issue