GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
KSQL_CLOSE(3) FreeBSD Library Functions Manual KSQL_CLOSE(3)

ksql_close
close a ksql database connection

library “ksql”

#include <sys/types.h>
#include <stdint.h>
#include <ksql.h>

enum ksqlc
ksql_close(struct ksql *sql);

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 invoked after all resources have been closed and freed.

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.

sqlite3_close(3), sqlite3_exec(3), sqlite3_finalize(3)
April 3, 2018 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.