summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-12-29 04:22:30 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2015-12-29 06:00:07 +0000
commitb91d57230921c9d95c376b91277ac5fe5e00ed1a (patch)
tree16fd3828836cceb667b93a801087bf0345045e9c
parentNon-const execute and save points (diff)
downloadlibdbpp-postgresql-b91d57230921c9d95c376b91277ac5fe5e00ed1a.tar.bz2
libdbpp-postgresql-b91d57230921c9d95c376b91277ac5fe5e00ed1a.tar.xz
libdbpp-postgresql-b91d57230921c9d95c376b91277ac5fe5e00ed1a.zip
Default (not supported) bulk upload implementation
-rw-r--r--libpqpp/pq-connection.cpp4
-rw-r--r--libpqpp/pq-connection.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/libpqpp/pq-connection.cpp b/libpqpp/pq-connection.cpp
index 8fb6350..be57cc5 100644
--- a/libpqpp/pq-connection.cpp
+++ b/libpqpp/pq-connection.cpp
@@ -166,7 +166,7 @@ PQ::Connection::checkResultFree(PGresult * res, int expected, int alt) const
}
void
-PQ::Connection::beginBulkUpload(const char * table, const char * extra) const
+PQ::Connection::beginBulkUpload(const char * table, const char * extra)
{
char buf[BUFSIZ];
snprintf(buf, BUFSIZ, "COPY %s FROM STDIN %s", table, extra);
@@ -174,7 +174,7 @@ PQ::Connection::beginBulkUpload(const char * table, const char * extra) const
}
void
-PQ::Connection::endBulkUpload(const char * msg) const
+PQ::Connection::endBulkUpload(const char * msg)
{
switch (PQputCopyEnd(conn, msg)) {
case 0:// block
diff --git a/libpqpp/pq-connection.h b/libpqpp/pq-connection.h
index 54ba52a..85dde59 100644
--- a/libpqpp/pq-connection.h
+++ b/libpqpp/pq-connection.h
@@ -32,8 +32,8 @@ namespace PQ {
int64_t insertId() const override;
- void beginBulkUpload(const char *, const char *) const override;
- void endBulkUpload(const char *) const override;
+ void beginBulkUpload(const char *, const char *) override;
+ void endBulkUpload(const char *) override;
size_t bulkUploadData(const char *, size_t) const override;
PGresult * checkResult(PGresult * res, int expected, int alternative = -1) const;