Exemple #1
0
    Connection::~Connection()
    {
      if (db)
      {
        clearStatementCache();

        log_debug("sqlite3_close(" << db << ")");
        ::sqlite3_close(db);
      }
    }
Exemple #2
0
    Connection::~Connection()
    {
      if (conn)
      {
        clearStatementCache();
        currvalStmt = tntdb::Statement();

        log_debug("PQfinish(" << conn << ")");
        PQfinish(conn);
      }
    }
Exemple #3
0
 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");
   }
 }
Exemple #4
0
    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);
      }
    }
Exemple #5
0
 Connection::~Connection()
 {
   clearStatementCache();
 }