#include "pdns/namespaces.hh"
#include "pdns/md5.hh"
+static AtomicCounter s_txid;
+
bool SOracle::s_dolog;
class SOracleStatement: public SSqlStatement {
}
}
+void SOracle::startTransaction() {
+ std::string cmd = "SET TRANSACTION NAME '" + boost::lexical_cast<std::string>(s_txid++) + "'";
+ execute(cmd);
+}
+
+void SOracle::commit() {
+ execute("COMMIT");
+}
+
+void SOracle::rollback() {
+ execute("ROLLBACK");
+}
+
SSqlException SOracle::sPerrorException(const string &reason)
{
return SSqlException(reason);
#include "pdns/utility.hh"
#include <oci.h>
#include <oratypes.h>
+#include "pdns/misc.hh"
#ifndef dsword
typedef sb4 dsword;
SSqlStatement* prepare(const string& query, int nparams);
void execute(const string& query);
- void startTransaction() {}
- void commit() {}
- void rollback() {}
+ void startTransaction();
+ void commit();
+ void rollback();
private:
OCIEnv* d_environmentHandle;
OCIError* d_errorHandle;