From 3bc5964793f1700551b7db8107a939c98f1d1be1 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 13 Jun 2021 21:29:25 +0100 Subject: Add transaction support --- lib/output/pq/pqConn.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'lib/output/pq/pqConn.cpp') 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 @@ -43,6 +43,24 @@ namespace MyGrate::Output::Pq { return std::make_unique(q, n, this); } + void + PqConn::beginTx() + { + query("BEGIN"); + } + + void + PqConn::commitTx() + { + query("COMMIT"); + } + + void + PqConn::rollbackTx() + { + query("ROLLBACK"); + } + void PqConn::notice_processor(void * p, const char * n) { -- cgit v1.2.3