|
NAMEksql_close —
close a ksql database connection
LIBRARYlibrary “ksql”SYNOPSIS#include <sys/types.h>
#include <stdint.h>
#include <ksql.h>
enum ksqlc
DESCRIPTIONTheksql_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
RETURN VALUESThis returnsKSQL_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 ALSOsqlite3_close(3), sqlite3_exec(3), sqlite3_finalize(3)
Visit the GSP FreeBSD Man Page Interface. |