diff options
author | randomdan <randomdan@localhost> | 2011-02-11 14:55:07 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2011-02-11 14:55:07 +0000 |
commit | 3d06746c56dc2a83638648f044f796842a94f890 (patch) | |
tree | 37c662c8df13b2cdca7a4da9669547fd264803aa /libpqpp/connection.cpp | |
parent | Fix binding length to handle multibyte content (diff) | |
download | libdbpp-postgresql-3d06746c56dc2a83638648f044f796842a94f890.tar.bz2 libdbpp-postgresql-3d06746c56dc2a83638648f044f796842a94f890.tar.xz libdbpp-postgresql-3d06746c56dc2a83638648f044f796842a94f890.zip |
Support for table patching in different ways according to what the connector says
Introduce two proper methods of bulk update
Tested against PG 8.4, MySQL 5.1 with single and multiple column keys
Diffstat (limited to 'libpqpp/connection.cpp')
-rw-r--r-- | libpqpp/connection.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libpqpp/connection.cpp b/libpqpp/connection.cpp index 4330b3f..24f3c33 100644 --- a/libpqpp/connection.cpp +++ b/libpqpp/connection.cpp @@ -3,6 +3,11 @@ #include "selectcommand.h" #include "modifycommand.h" +static void +noNoticeProcessor(void * arg, const char * message) +{ +} + PQ::Connection::Connection(const std::string & info) : conn(PQconnectdb(info.c_str())), txDepth(0), @@ -11,6 +16,7 @@ PQ::Connection::Connection(const std::string & info) : if (PQstatus(conn) != CONNECTION_OK) { throw ConnectionError(); } + PQsetNoticeProcessor(conn, noNoticeProcessor, NULL); } PQ::Connection::~Connection() @@ -51,6 +57,18 @@ PQ::Connection::inTx() const return txDepth; } +DB::BulkDeleteStyle +PQ::Connection::bulkDeleteStyle() const +{ + return DB::BulkDeleteUsingUsing; +} + +DB::BulkUpdateStyle +PQ::Connection::bulkUpdateStyle() const +{ + return DB::BulkUpdateUsingFromSrc; +} + void PQ::Connection::ping() const { |