FreeBSD Manual Pages
KSQL_CLOSE(3) Library Functions Manual KSQL_CLOSE(3) NAME ksql_close -- close a ksql database connection LIBRARY library "ksql" SYNOPSIS #include <sys/types.h> #include <stdint.h> #include <ksql.h> enum ksqlc ksql_close(struct ksql *sql); DESCRIPTION The ksql_close function closes a database connection opened with ksql_open(3). If the connection was not opened, is already closed, or sql is NULL, this function is a no-op. This function will begin by calling sqlite3_finalize(3) on all active statements (it is an error to have any open connections), then it will roll back any open transactions (also triggering an error) if found, then it will close out the database itself with sqlite3_close(3). In the event of statements still being open, all statements are finalised and the database closed prior to calling the error handler. If KSQL_FAIL_ON_EXIT was specified on sql, the exit(2) will only be in- voked after all resources have been closed and freed. RETURN VALUES This returns KSQL_STMT if there were open statements, KSQL_TRANS if there was an open transaction (if there were both open statements and a transaction, this is returned), KSQL_DB if there were database-level errors (this overrides whether there were open transactions and/or a transaction), or KSQL_OK on success. SEE ALSO sqlite3_close(3), sqlite3_exec(3), sqlite3_finalize(3) FreeBSD Ports 14.quarterly April 3, 2018 KSQL_CLOSE(3)
NAME | LIBRARY | SYNOPSIS | DESCRIPTION | RETURN VALUES | SEE ALSO
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=ksql_close&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>