diff options
author | joerg <joerg@pkgsrc.org> | 2013-08-27 22:28:05 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2013-08-27 22:28:05 +0000 |
commit | 1007a428b8f03de71346ab147c825f49ec2aa6a9 (patch) | |
tree | 994f538f95fe3d4d59cc7b5b62f68f153e3eaa0b /databases | |
parent | 0ace76b0c08c065e09bcc6d06767510ecf2db9e2 (diff) | |
download | pkgsrc-1007a428b8f03de71346ab147c825f49ec2aa6a9.tar.gz |
Merge get_next_sequence_value support for PostgreSQL from upstream.
Bump revision.
Diffstat (limited to 'databases')
-rw-r--r-- | databases/soci/Makefile | 3 | ||||
-rw-r--r-- | databases/soci/distinfo | 4 | ||||
-rw-r--r-- | databases/soci/patches/patch-backends_postgresql_session.cpp | 27 | ||||
-rw-r--r-- | databases/soci/patches/patch-backends_postgresql_soci-postgresql.h | 14 |
4 files changed, 46 insertions, 2 deletions
diff --git a/databases/soci/Makefile b/databases/soci/Makefile index 1717a58584f..4d39796db1c 100644 --- a/databases/soci/Makefile +++ b/databases/soci/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.1 2013/07/05 21:04:45 joerg Exp $ +# $NetBSD: Makefile,v 1.2 2013/08/27 22:28:05 joerg Exp $ # DISTNAME= soci-3.2.1 +PKGREVISION= 1 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=soci/} diff --git a/databases/soci/distinfo b/databases/soci/distinfo index 33cfeaa3d18..c1546928214 100644 --- a/databases/soci/distinfo +++ b/databases/soci/distinfo @@ -1,7 +1,9 @@ -$NetBSD: distinfo,v 1.1 2013/07/05 21:04:45 joerg Exp $ +$NetBSD: distinfo,v 1.2 2013/08/27 22:28:05 joerg Exp $ SHA1 (soci-3.2.1.tar.gz) = 38f602ec8d61c4563df8ea4d4ed318dc378e7096 RMD160 (soci-3.2.1.tar.gz) = 3e98139aa904c62dbf7cc6a1fae5fc73042a6364 Size (soci-3.2.1.tar.gz) = 343358 bytes SHA1 (patch-CMakeLists.txt) = c66f0b8fd3ca0fedaebedd6943ae0471f7c6ba35 +SHA1 (patch-backends_postgresql_session.cpp) = d816ffc0c4981ef9b2bdcb28e9e4292b519d3e75 +SHA1 (patch-backends_postgresql_soci-postgresql.h) = 1c01ebdad82d4f641024b8e73a4c853f1c83b134 SHA1 (patch-backends_sqlite3_soci-sqlite3.h) = 688260116f0e35f37f7de8d61366a3397259dc0c diff --git a/databases/soci/patches/patch-backends_postgresql_session.cpp b/databases/soci/patches/patch-backends_postgresql_session.cpp new file mode 100644 index 00000000000..6977c531ca6 --- /dev/null +++ b/databases/soci/patches/patch-backends_postgresql_session.cpp @@ -0,0 +1,27 @@ +$NetBSD: patch-backends_postgresql_session.cpp,v 1.1 2013/08/27 22:28:05 joerg Exp $ + +--- backends/postgresql/session.cpp.orig 2013-08-26 22:13:09.945248387 +0000 ++++ backends/postgresql/session.cpp +@@ -8,6 +8,7 @@ + #define SOCI_POSTGRESQL_SOURCE + #include "soci-postgresql.h" + #include "error.h" ++#include "session.h" + #include <connection-parameters.h> + #include <libpq/libpq-fs.h> // libpq + #include <cctype> +@@ -51,6 +52,14 @@ postgresql_session_backend::postgresql_s + conn_ = conn; + } + ++bool postgresql_session_backend::get_next_sequence_value( ++ session & s, std::string const & sequence, long & value) ++{ ++ s << "select nextval('" + sequence + "')", into(value); ++ ++ return true; ++} ++ + postgresql_session_backend::~postgresql_session_backend() + { + clean_up(); diff --git a/databases/soci/patches/patch-backends_postgresql_soci-postgresql.h b/databases/soci/patches/patch-backends_postgresql_soci-postgresql.h new file mode 100644 index 00000000000..bd9563f42a2 --- /dev/null +++ b/databases/soci/patches/patch-backends_postgresql_soci-postgresql.h @@ -0,0 +1,14 @@ +$NetBSD: patch-backends_postgresql_soci-postgresql.h,v 1.1 2013/08/27 22:28:05 joerg Exp $ + +--- backends/postgresql/soci-postgresql.h.orig 2013-08-26 22:14:11.873247651 +0000 ++++ backends/postgresql/soci-postgresql.h +@@ -239,6 +239,9 @@ struct postgresql_session_backend : deta + + void deallocate_prepared_statement(const std::string & statementName); + ++ virtual bool get_next_sequence_value(session & s, ++ std::string const & sequence, long & value); ++ + virtual std::string get_backend_name() const { return "postgresql"; } + + void clean_up(); |