Connection::~Connection() { if (db) { clearStatementCache(); log_debug("sqlite3_close(" << db << ")"); ::sqlite3_close(db); } }
Connection::~Connection() { if (conn) { clearStatementCache(); currvalStmt = tntdb::Statement(); log_debug("PQfinish(" << conn << ")"); PQfinish(conn); } }
void Connection::rollbackTransaction() { if (transactionActive == 0 || --transactionActive == 0) { // Statement handles are invalidated at transaction end, therefore we // release all cached statements here. // The problem still remains since the application might preserve a // statement handle, which can't be released here. clearStatementCache(); execute("ROLLBACK TRANSACTION"); } }
Connection::~Connection() { if (initialized) { clearStatementCache(); if (!lockTablesQuery.empty()) { log_debug("mysql_query(\"UNLOCK TABLES\")"); if (::mysql_query(&mysql, "UNLOCK TABLES") != 0) log_warn(MysqlError("mysql_query", &mysql).what()); } log_debug("mysql_close(" << &mysql << ')'); ::mysql_close(&mysql); } }
Connection::~Connection() { clearStatementCache(); }