@@ -176,6 +176,14 @@ The base API is used to do things like create database connections and provide a
...
@@ -176,6 +176,14 @@ The base API is used to do things like create database connections and provide a
Set the current default database to `db`.
Set the current default database to `db`.
- `int taos_get_current_db(TAOS *taos, char *database, int len, int *required)`
- The variables database and len are applied by the user outside and allocated space. The current database name and length will be assigned to database and len.
- As long as the db name is not assigned to the database normally (including truncation), an error will be returned with the return value of -1, and then the user can use taos_errstr(NULL) to get error message.
- If database==NULL or len<=0, returns an error, the space required to store the db (including the last '\0') in the variable required
- If len is less than the space required to store the db (including the last '\0'), an error is returned. The truncated data assigned in the database ends with '\0'.
- If len is greater than or equal to the space required to store the db (including the last '\0'), return normal 0, and assign the db name ending with '\0' in the database.
- `void taos_close(TAOS *taos)`
- `void taos_close(TAOS *taos)`
Closes the connection, where `taos` is the handle returned by `taos_connect()`.
Closes the connection, where `taos` is the handle returned by `taos_connect()`.