summaryrefslogtreecommitdiff
path: root/lib/output
diff options
context:
space:
mode:
Diffstat (limited to 'lib/output')
-rw-r--r--lib/output/pq/pqConn.cpp18
-rw-r--r--lib/output/pq/pqConn.h4
2 files changed, 22 insertions, 0 deletions
diff --git a/lib/output/pq/pqConn.cpp b/lib/output/pq/pqConn.cpp
index 309b704..ba95cad 100644
--- a/lib/output/pq/pqConn.cpp
+++ b/lib/output/pq/pqConn.cpp
@@ -44,6 +44,24 @@ namespace MyGrate::Output::Pq {
}
void
+ PqConn::beginTx()
+ {
+ query("BEGIN");
+ }
+
+ void
+ PqConn::commitTx()
+ {
+ query("COMMIT");
+ }
+
+ void
+ PqConn::rollbackTx()
+ {
+ query("ROLLBACK");
+ }
+
+ void
PqConn::notice_processor(void * p, const char * n)
{
return static_cast<PqConn *>(p)->notice_processor(n);
diff --git a/lib/output/pq/pqConn.h b/lib/output/pq/pqConn.h
index 6db9bcf..3b27f97 100644
--- a/lib/output/pq/pqConn.h
+++ b/lib/output/pq/pqConn.h
@@ -32,6 +32,10 @@ namespace MyGrate::Output::Pq {
DbPrepStmtPtr prepare(const char * const, std::size_t nParams) override;
+ void beginTx() override;
+ void commitTx() override;
+ void rollbackTx() override;
+
const std::string connstr;
private: