aboutsummaryrefslogtreecommitdiff
path: root/pgsql
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2023-12-13 21:57:53 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-01-23 21:20:44 +0300
commitfc3fb39c90ab7fe5fccbe3f3bc0eb2645157bb96 (patch)
tree6c8c1bfb5fe89f7378b92ac066b4ca8ecfd25228 /pgsql
parent02367faedb16b6186e8852de47e5b749dc48c2df (diff)
Switch to build2
Diffstat (limited to 'pgsql')
-rw-r--r--pgsql/Makefile.am5
-rw-r--r--pgsql/buildfile6
-rw-r--r--pgsql/bulk/buildfile40
-rw-r--r--pgsql/bulk/driver.cxx39
-rw-r--r--pgsql/bulk/makefile107
-rw-r--r--pgsql/bulk/test.std0
-rw-r--r--pgsql/bulk/testscript18
-rw-r--r--pgsql/custom/buildfile37
-rw-r--r--pgsql/custom/driver.cxx14
-rw-r--r--pgsql/custom/makefile110
-rw-r--r--pgsql/custom/test.std0
-rw-r--r--pgsql/custom/testscript11
-rw-r--r--pgsql/database/buildfile11
-rw-r--r--pgsql/database/driver.cxx3
-rw-r--r--pgsql/database/makefile79
-rw-r--r--pgsql/database/test.std0
-rw-r--r--pgsql/database/testscript6
-rw-r--r--pgsql/index/buildfile34
-rw-r--r--pgsql/index/driver.cxx10
-rw-r--r--pgsql/index/makefile107
-rw-r--r--pgsql/index/test.std0
-rw-r--r--pgsql/index/testscript11
-rw-r--r--pgsql/makefile41
-rw-r--r--pgsql/native/buildfile16
-rw-r--r--pgsql/native/driver.cxx10
-rw-r--r--pgsql/native/makefile79
-rw-r--r--pgsql/native/test.std0
-rw-r--r--pgsql/native/testscript9
-rw-r--r--pgsql/savepoint/driver.cxx58
-rw-r--r--pgsql/savepoint/makefile107
-rw-r--r--pgsql/savepoint/test.hxx27
-rw-r--r--pgsql/savepoint/test.std0
-rw-r--r--pgsql/template/Makefile.am34
-rw-r--r--pgsql/template/driver.cxx40
-rw-r--r--pgsql/template/makefile107
-rw-r--r--pgsql/template/template-vc10.vcxproj180
-rw-r--r--pgsql/template/template-vc10.vcxproj.filters25
-rw-r--r--pgsql/template/template-vc11.vcxproj184
-rw-r--r--pgsql/template/template-vc11.vcxproj.filters25
-rw-r--r--pgsql/template/template-vc12.vcxproj188
-rw-r--r--pgsql/template/template-vc12.vcxproj.filters25
-rw-r--r--pgsql/template/template-vc8.vcproj354
-rw-r--r--pgsql/template/template-vc9.vcproj361
-rw-r--r--pgsql/template/test.hxx25
-rw-r--r--pgsql/template/test.std0
-rw-r--r--pgsql/test.bat68
-rw-r--r--pgsql/truncation/buildfile35
-rw-r--r--pgsql/truncation/driver.cxx16
-rw-r--r--pgsql/truncation/makefile107
-rw-r--r--pgsql/truncation/test.std0
-rw-r--r--pgsql/truncation/testscript11
-rw-r--r--pgsql/types/buildfile36
-rw-r--r--pgsql/types/driver.cxx18
-rw-r--r--pgsql/types/makefile109
-rw-r--r--pgsql/types/test.hxx6
-rw-r--r--pgsql/types/test.std0
-rw-r--r--pgsql/types/testscript11
57 files changed, 367 insertions, 2593 deletions
diff --git a/pgsql/Makefile.am b/pgsql/Makefile.am
deleted file mode 100644
index fcf14e8..0000000
--- a/pgsql/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-# file : pgsql/Makefile.am
-# license : GNU GPL v2; see accompanying LICENSE file
-
-SUBDIRS = __path__(dirs)
-EXTRA_DIST = __file__(extra_dist)
diff --git a/pgsql/buildfile b/pgsql/buildfile
new file mode 100644
index 0000000..c6385c0
--- /dev/null
+++ b/pgsql/buildfile
@@ -0,0 +1,6 @@
+# file : pgsql/buildfile
+# license : GNU GPL v2; see accompanying LICENSE file
+
+./: {*/ -bulk/}
+
+./: bulk/: include = ($pgsql && !$multi && $pgsql_bulk)
diff --git a/pgsql/bulk/buildfile b/pgsql/bulk/buildfile
new file mode 100644
index 0000000..6984edb
--- /dev/null
+++ b/pgsql/bulk/buildfile
@@ -0,0 +1,40 @@
+# file : pgsql/bulk/buildfile
+# license : GNU GPL v2; see accompanying LICENSE file
+
+if ($build.meta_operation != 'dist')
+{
+ assert ($pgsql && !$multi) \
+ "pgsql should be configured via config.odb_tests.database variable as a single database"
+
+ assert ($pgsql_bulk) "bulk operations are disabled for pgsql"
+}
+
+import libodb = libodb%lib{odb}
+
+import libs = libpq%lib{pq}
+import libs += libodb-pgsql%lib{odb-pgsql}
+import libs += lib{common}
+
+exe{driver}: {hxx cxx}{* -*-odb} {hxx ixx cxx}{test-odb} testscript
+
+# Introduce the metadata library target to make sure the libodb library is
+# resolved for the odb_compile ad hoc rule (see build/root.build for details).
+#
+libue{test-meta}: $libodb
+
+<{hxx ixx cxx}{test-odb}>: hxx{test} libue{test-meta}
+
+exe{driver}: libue{test-meta} $libs
+
+# Specify the ODB custom options to be used by the odb_compile ad hoc rule
+# (see build/root.build for details).
+#
+odb_options = --table-prefix pgsql_bulk_ \
+ --generate-schema \
+ --generate-query
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
+
+# Testscript's run-time prerequisites.
+#
+exe{driver}: ../../alias{pgsql-client}: include = adhoc
diff --git a/pgsql/bulk/driver.cxx b/pgsql/bulk/driver.cxx
index fd629b8..ba25542 100644
--- a/pgsql/bulk/driver.cxx
+++ b/pgsql/bulk/driver.cxx
@@ -1,4 +1,4 @@
-// file : pgsql/savepoint/driver.cxx
+// file : pgsql/bulk/driver.cxx
// license : GNU GPL v2; see accompanying LICENSE file
// Test transaction savepoints.
@@ -10,7 +10,6 @@
#include <stdio.h>
#include <string.h>
#include <stddef.h>
-#include <assert.h>
#include <sys/select.h>
// Note: hack.
@@ -18,6 +17,9 @@
#include <arpa/inet.h>
#define htonll(x) ((((long long)htonl(x)) << 32) + htonl((x) >> 32))
+#undef NDEBUG
+#include <assert.h>
+
static const size_t columns = 3;
struct data
@@ -255,20 +257,22 @@ test (PGconn* conn)
}
}
-#include <memory> // std::auto_ptr
-#include <cassert>
-#include <iostream>
-
#include <vector>
+#include <memory> // std::unique_ptr
+#include <cstring>
+#include <iostream>
#include <odb/pgsql/database.hxx>
#include <odb/pgsql/transaction.hxx>
-#include <common/common.hxx>
+#include <libcommon/common.hxx>
#include "test.hxx"
#include "test-odb.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
namespace pgsql = odb::pgsql;
using namespace pgsql;
@@ -276,9 +280,26 @@ using namespace pgsql;
int
main (int argc, char* argv[])
{
+ bool fail_already_persistent (false);
+
+ for (int i (1); i != argc; ++i)
+ {
+ if (strcmp (argv[i], "--fail-already-persistent") == 0)
+ {
+ fail_already_persistent = true;
+
+ for (; i != argc - 1; ++i)
+ argv[i] = argv[i + 1];
+
+ --argc;
+
+ break;
+ }
+ }
+
try
{
- auto_ptr<database> db (create_specific_database<database> (argc, argv));
+ unique_ptr<database> db (create_specific_database<database> (argc, argv));
connection_ptr cn (db->connection ());
@@ -297,7 +318,7 @@ main (int argc, char* argv[])
{
os.push_back (object {i, i, string (i, 'x')});
- if (i == n / 2)
+ if (fail_already_persistent && i == n / 2)
os.push_back (object {i, i, to_string (i)});
}
diff --git a/pgsql/bulk/makefile b/pgsql/bulk/makefile
deleted file mode 100644
index 12f8dbb..0000000
--- a/pgsql/bulk/makefile
+++ /dev/null
@@ -1,107 +0,0 @@
-# file : pgsql/savepoint/makefile
-# license : GNU GPL v2; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make
-
-cxx_tun := driver.cxx
-odb_hdr := test.hxx
-genf := $(call odb-gen,$(odb_hdr))
-gen := $(addprefix $(out_base)/,$(genf))
-cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) $(filter %.o,$(gen:.cxx=.o))
-cxx_od := $(cxx_obj:.o=.o.d)
-
-common.l := $(out_root)/libcommon/common/common.l
-common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/odb/stub.make,\
- odb: odb,odb-rules: odb_rules)
-
-# Build.
-#
-$(driver): $(cxx_obj) $(common.l)
-$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base)
-$(cxx_obj) $(cxx_od): $(common.l.cpp-options)
-
-$(gen): $(odb)
-$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database pgsql --generate-schema \
---generate-query --table-prefix pgsql_bulk_
-$(gen): cpp_options := -I$(src_base)
-$(gen): $(common.l.cpp-options)
-
-$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
-
-# Alias for default target.
-#
-$(out_base)/: $(driver)
-
-# Dist
-#
-$(dist): sources := $(cxx_tun)
-$(dist): headers := $(odb_hdr)
-$(dist): data_dist := test.std
-$(dist): export name := $(subst /,-,$(subst $(src_root)/pgsql/,,$(src_base)))
-$(dist): export extra_dist := $(data_dist) \
-$(name)-vc8.vcproj $(name)-vc9.vcproj \
-$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \
-$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \
-$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters
-$(dist):
- $(call dist-data,$(sources) $(headers) $(data_dist))
- $(call meta-automake,../template/Makefile.am)
- $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj)
- $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj)
- $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj)
- $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj)
- $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj)
-
-# Test.
-#
-$(eval $(call test-rule))
-
-# Clean.
-#
-$(clean): \
- $(driver).o.clean \
- $(addsuffix .cxx.clean,$(cxx_obj)) \
- $(addsuffix .cxx.clean,$(cxx_od)) \
- $(addsuffix .hxx.clean,$(filter %.cxx,$(gen)))
- $(call message,,rm -f $(out_base)/test.out)
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/dist.make)
-$(call include,$(bld_root)/meta/vc8proj.make)
-$(call include,$(bld_root)/meta/vc9proj.make)
-$(call include,$(bld_root)/meta/vc10proj.make)
-$(call include,$(bld_root)/meta/vc11proj.make)
-$(call include,$(bld_root)/meta/vc12proj.make)
-$(call include,$(bld_root)/meta/automake.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): odb_options += --std $(cxx_standard)
-$(call include,$(odb_rules))
-endif
-
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/o-e.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/libcommon/makefile)
diff --git a/pgsql/bulk/test.std b/pgsql/bulk/test.std
deleted file mode 100644
index e69de29..0000000
--- a/pgsql/bulk/test.std
+++ /dev/null
diff --git a/pgsql/bulk/testscript b/pgsql/bulk/testscript
new file mode 100644
index 0000000..60b7d92
--- /dev/null
+++ b/pgsql/bulk/testscript
@@ -0,0 +1,18 @@
+# file : pgsql/custom/testscript
+# license : GNU GPL v2; see accompanying LICENSE file
+
+.include ../../database-options.testscript
+.include ../../pgsql.testscript
+
++$create_schema
+
+: basics
+:
+{
+ $*;
+
+ $* --fail-already-persistent 2>>EOE != 0
+ multiple exceptions, 252 elements attempted, 1 failed, fatal:
+ [251] object already persistent
+ EOE
+}
diff --git a/pgsql/custom/buildfile b/pgsql/custom/buildfile
new file mode 100644
index 0000000..a5c6717
--- /dev/null
+++ b/pgsql/custom/buildfile
@@ -0,0 +1,37 @@
+# file : pgsql/custom/buildfile
+# license : GNU GPL v2; see accompanying LICENSE file
+
+assert ($pgsql && !$multi || $build.meta_operation == 'dist') \
+"pgsql should be configured via config.odb_tests.database variable as a single database"
+
+import libodb = libodb%lib{odb}
+
+import libs = libodb-pgsql%lib{odb-pgsql}
+import libs += lib{common}
+
+exe{driver}: {hxx cxx}{* -*-odb} {hxx ixx cxx}{test-odb} testscript
+
+# Introduce the metadata library target to make sure the libodb library is
+# resolved for the odb_compile ad hoc rule (see build/root.build for details).
+#
+libue{test-meta}: $libodb
+
+<{hxx ixx cxx}{test-odb}>: hxx{test} libue{test-meta}
+
+exe{driver}: libue{test-meta} $libs
+
+# Specify the ODB custom options to be used by the odb_compile ad hoc rule
+# (see build/root.build for details).
+#
+odb_options = --table-prefix pgsql_custom_ \
+ --generate-schema \
+ --default-database common \
+ --generate-query \
+ --hxx-prologue '#include "traits.hxx"' \
+ --hxx-prologue '#include "query.hxx"'
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
+
+# Testscript's run-time prerequisites.
+#
+exe{driver}: ../../alias{pgsql-client}: include = adhoc
diff --git a/pgsql/custom/driver.cxx b/pgsql/custom/driver.cxx
index bc52674..91ff0ce 100644
--- a/pgsql/custom/driver.cxx
+++ b/pgsql/custom/driver.cxx
@@ -4,18 +4,20 @@
// Test custom database type mapping in PostgreSQL.
//
-#include <memory> // std::auto_ptr
-#include <cassert>
+#include <memory> // std::unique_ptr
#include <iostream>
#include <odb/pgsql/database.hxx>
#include <odb/pgsql/transaction.hxx>
-#include <common/common.hxx>
+#include <libcommon/common.hxx>
#include "test.hxx"
#include "test-odb.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
namespace pgsql = odb::pgsql;
using namespace pgsql;
@@ -25,7 +27,7 @@ main (int argc, char* argv[])
{
try
{
- auto_ptr<database> db (create_specific_database<database> (argc, argv));
+ unique_ptr<database> db (create_specific_database<database> (argc, argv));
object o (1);
o.p = point (1.1111, 2222222222.2);
@@ -53,7 +55,7 @@ main (int argc, char* argv[])
//
{
transaction t (db->begin ());
- auto_ptr<object> o1 (db->load<object> (1));
+ unique_ptr<object> o1 (db->load<object> (1));
t.commit ();
assert (o == *o1);
@@ -109,7 +111,7 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
- auto_ptr<object> o1 (db->load<object> (1));
+ unique_ptr<object> o1 (db->load<object> (1));
t.commit ();
assert (o == *o1);
diff --git a/pgsql/custom/makefile b/pgsql/custom/makefile
deleted file mode 100644
index 18f11e6..0000000
--- a/pgsql/custom/makefile
+++ /dev/null
@@ -1,110 +0,0 @@
-# file : pgsql/custom/makefile
-# license : GNU GPL v2; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make
-
-cxx_tun := driver.cxx
-odb_hdr := test.hxx
-genf := $(call odb-gen,$(odb_hdr))
-gen := $(addprefix $(out_base)/,$(genf))
-cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) $(filter %.o,$(gen:.cxx=.o))
-cxx_od := $(cxx_obj:.o=.o.d)
-
-common.l := $(out_root)/libcommon/common/common.l
-common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/odb/stub.make,\
- odb: odb,odb-rules: odb_rules)
-
-# Build.
-#
-$(driver): $(cxx_obj) $(common.l)
-$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base)
-$(cxx_obj) $(cxx_od): $(common.l.cpp-options)
-
-$(gen): $(odb)
-$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database pgsql --default-database \
-common --generate-schema --generate-query --hxx-prologue \
-'\#include "traits.hxx"' --hxx-prologue '\#include "query.hxx"' \
---table-prefix pgsql_custom_
-$(gen): cpp_options := -I$(src_base)
-$(gen): $(common.l.cpp-options)
-
-$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
-
-# Alias for default target.
-#
-$(out_base)/: $(driver)
-
-# Dist
-#
-$(dist): sources := $(cxx_tun)
-$(dist): headers := $(odb_hdr)
-$(dist): export extra_headers := traits.hxx query.hxx
-$(dist): data_dist := test.std
-$(dist): export name := $(subst /,-,$(subst $(src_root)/pgsql/,,$(src_base)))
-$(dist): export extra_dist := $(data_dist) \
-$(name)-vc8.vcproj $(name)-vc9.vcproj \
-$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \
-$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \
-$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters
-$(dist):
- $(call dist-data,$(sources) $(headers) $(extra_headers) $(data_dist))
- $(call meta-automake,../template/Makefile.am)
- $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj)
- $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj)
- $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj)
- $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj)
- $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj)
-
-# Test.
-#
-$(eval $(call test-rule))
-
-# Clean.
-#
-$(clean): \
- $(driver).o.clean \
- $(addsuffix .cxx.clean,$(cxx_obj)) \
- $(addsuffix .cxx.clean,$(cxx_od)) \
- $(addsuffix .hxx.clean,$(filter %.cxx,$(gen)))
- $(call message,,rm -f $(out_base)/test.out)
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/dist.make)
-$(call include,$(bld_root)/meta/vc8proj.make)
-$(call include,$(bld_root)/meta/vc9proj.make)
-$(call include,$(bld_root)/meta/vc10proj.make)
-$(call include,$(bld_root)/meta/vc11proj.make)
-$(call include,$(bld_root)/meta/vc12proj.make)
-$(call include,$(bld_root)/meta/automake.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): odb_options += --std $(cxx_standard)
-$(call include,$(odb_rules))
-endif
-
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/o-e.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/libcommon/makefile)
diff --git a/pgsql/custom/test.std b/pgsql/custom/test.std
deleted file mode 100644
index e69de29..0000000
--- a/pgsql/custom/test.std
+++ /dev/null
diff --git a/pgsql/custom/testscript b/pgsql/custom/testscript
new file mode 100644
index 0000000..8e1448b
--- /dev/null
+++ b/pgsql/custom/testscript
@@ -0,0 +1,11 @@
+# file : pgsql/custom/testscript
+# license : GNU GPL v2; see accompanying LICENSE file
+
+.include ../../database-options.testscript
+.include ../../pgsql.testscript
+
++$create_schema
+
+: basics
+:
+$*
diff --git a/pgsql/database/buildfile b/pgsql/database/buildfile
new file mode 100644
index 0000000..6977ea6
--- /dev/null
+++ b/pgsql/database/buildfile
@@ -0,0 +1,11 @@
+# file : pgsql/database/buildfile
+# license : GNU GPL v2; see accompanying LICENSE file
+
+assert ($pgsql && !$multi || $build.meta_operation == 'dist') \
+"pgsql should be configured via config.odb_tests.database variable as a single database"
+
+import libs = libodb-pgsql%lib{odb-pgsql}
+
+exe{driver}: {hxx cxx}{*} $libs testscript
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
diff --git a/pgsql/database/driver.cxx b/pgsql/database/driver.cxx
index 5673caa..56bde0a 100644
--- a/pgsql/database/driver.cxx
+++ b/pgsql/database/driver.cxx
@@ -6,6 +6,9 @@
#include <odb/pgsql/database.hxx>
+#undef NDEBUG
+#include <cassert>
+
namespace pgsql = odb::pgsql;
using namespace pgsql;
diff --git a/pgsql/database/makefile b/pgsql/database/makefile
deleted file mode 100644
index 2948467..0000000
--- a/pgsql/database/makefile
+++ /dev/null
@@ -1,79 +0,0 @@
-# file : pgsql/database/makefile
-# license : GNU GPL v2; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make
-
-cxx_tun := driver.cxx
-cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o))
-cxx_od := $(cxx_obj:.o=.o.d)
-
-common.l := $(out_root)/libcommon/common/common.l
-common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options
-
-# Build.
-#
-$(driver): $(cxx_obj) $(common.l)
-$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base)
-$(cxx_obj) $(cxx_od): $(common.l.cpp-options)
-
-$(call include-dep,$(cxx_od))
-
-# Alias for default target.
-#
-$(out_base)/: $(driver)
-
-# Dist
-#
-$(dist): sources := $(cxx_tun)
-$(dist): data_dist := test.std
-$(dist): export name := $(subst /,-,$(subst $(src_root)/pgsql/,,$(src_base)))
-$(dist): export extra_dist := $(data_dist) \
-$(name)-vc8.vcproj $(name)-vc9.vcproj \
-$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \
-$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \
-$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters
-$(dist):
- $(call dist-data,$(sources) $(data_dist))
- $(call meta-automake,../template/Makefile.am)
- $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj)
- $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj)
- $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj)
- $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj)
- $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj)
-
-# Test.
-#
-$(eval $(call test-schemaless-rule))
-
-# Clean.
-#
-$(clean): \
- $(driver).o.clean \
- $(addsuffix .cxx.clean,$(cxx_obj)) \
- $(addsuffix .cxx.clean,$(cxx_od))
- $(call message,,rm -f $(out_base)/test.out)
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/dist.make)
-$(call include,$(bld_root)/meta/vc8proj.make)
-$(call include,$(bld_root)/meta/vc9proj.make)
-$(call include,$(bld_root)/meta/vc10proj.make)
-$(call include,$(bld_root)/meta/vc11proj.make)
-$(call include,$(bld_root)/meta/vc12proj.make)
-$(call include,$(bld_root)/meta/automake.make)
-
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/o-e.make)
diff --git a/pgsql/database/test.std b/pgsql/database/test.std
deleted file mode 100644
index e69de29..0000000
--- a/pgsql/database/test.std
+++ /dev/null
diff --git a/pgsql/database/testscript b/pgsql/database/testscript
new file mode 100644
index 0000000..f57a8e1
--- /dev/null
+++ b/pgsql/database/testscript
@@ -0,0 +1,6 @@
+# file : pgsql/database/testscript
+# license : GNU GPL v2; see accompanying LICENSE file
+
+: basics
+:
+$*
diff --git a/pgsql/index/buildfile b/pgsql/index/buildfile
new file mode 100644
index 0000000..a84ed9a
--- /dev/null
+++ b/pgsql/index/buildfile
@@ -0,0 +1,34 @@
+# file : pgsql/index/buildfile
+# license : GNU GPL v2; see accompanying LICENSE file
+
+assert ($pgsql && !$multi || $build.meta_operation == 'dist') \
+"pgsql should be configured via config.odb_tests.database variable as a single database"
+
+import libodb = libodb%lib{odb}
+
+import libs = libodb-pgsql%lib{odb-pgsql}
+import libs += lib{common}
+
+exe{driver}: {hxx cxx}{* -*-odb} {hxx ixx cxx}{test-odb} testscript
+
+# Introduce the metadata library target to make sure the libodb library is
+# resolved for the odb_compile ad hoc rule (see build/root.build for details).
+#
+libue{test-meta}: $libodb
+
+<{hxx ixx cxx}{test-odb}>: hxx{test} libue{test-meta}
+
+exe{driver}: libue{test-meta} $libs
+
+# Specify the ODB custom options to be used by the odb_compile ad hoc rule
+# (see build/root.build for details).
+#
+odb_options = --table-prefix pgsql_index_ \
+ --generate-schema \
+ --default-database common
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
+
+# Testscript's run-time prerequisites.
+#
+exe{driver}: ../../alias{pgsql-client}: include = adhoc
diff --git a/pgsql/index/driver.cxx b/pgsql/index/driver.cxx
index eb7de4b..dc4c11e 100644
--- a/pgsql/index/driver.cxx
+++ b/pgsql/index/driver.cxx
@@ -4,18 +4,20 @@
// Test PostgreSQL index creation. See also the common test.
//
-#include <memory> // std::auto_ptr
-#include <cassert>
+#include <memory> // std::unique_ptr
#include <iostream>
#include <odb/pgsql/database.hxx>
#include <odb/pgsql/transaction.hxx>
-#include <common/common.hxx>
+#include <libcommon/common.hxx>
#include "test.hxx"
#include "test-odb.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
namespace pgsql = odb::pgsql;
using namespace pgsql;
@@ -27,7 +29,7 @@ main (int argc, char* argv[])
{
// This is just a schema creation test.
//
- auto_ptr<database> db (create_specific_database<database> (argc, argv));
+ unique_ptr<database> db (create_specific_database<database> (argc, argv));
{
transaction t (db->begin ());
diff --git a/pgsql/index/makefile b/pgsql/index/makefile
deleted file mode 100644
index 9db50ce..0000000
--- a/pgsql/index/makefile
+++ /dev/null
@@ -1,107 +0,0 @@
-# file : pgsql/index/makefile
-# license : GNU GPL v2; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make
-
-cxx_tun := driver.cxx
-odb_hdr := test.hxx
-genf := $(call odb-gen,$(odb_hdr))
-gen := $(addprefix $(out_base)/,$(genf))
-cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) $(filter %.o,$(gen:.cxx=.o))
-cxx_od := $(cxx_obj:.o=.o.d)
-
-common.l := $(out_root)/libcommon/common/common.l
-common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/odb/stub.make,\
- odb: odb,odb-rules: odb_rules)
-
-# Build.
-#
-$(driver): $(cxx_obj) $(common.l)
-$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base)
-$(cxx_obj) $(cxx_od): $(common.l.cpp-options)
-
-$(gen): $(odb)
-$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database pgsql --default-database \
-common --generate-schema --table-prefix pgsql_index_
-$(gen): cpp_options := -I$(src_base)
-$(gen): $(common.l.cpp-options)
-
-$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
-
-# Alias for default target.
-#
-$(out_base)/: $(driver)
-
-# Dist
-#
-$(dist): sources := $(cxx_tun)
-$(dist): headers := $(odb_hdr)
-$(dist): data_dist := test.std
-$(dist): export name := $(subst /,-,$(subst $(src_root)/pgsql/,,$(src_base)))
-$(dist): export extra_dist := $(data_dist) \
-$(name)-vc8.vcproj $(name)-vc9.vcproj \
-$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \
-$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \
-$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters
-$(dist):
- $(call dist-data,$(sources) $(headers) $(data_dist))
- $(call meta-automake,../template/Makefile.am)
- $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj)
- $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj)
- $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj)
- $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj)
- $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj)
-
-# Test.
-#
-$(eval $(call test-rule))
-
-# Clean.
-#
-$(clean): \
- $(driver).o.clean \
- $(addsuffix .cxx.clean,$(cxx_obj)) \
- $(addsuffix .cxx.clean,$(cxx_od)) \
- $(addsuffix .hxx.clean,$(filter %.cxx,$(gen)))
- $(call message,,rm -f $(out_base)/test.out)
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/dist.make)
-$(call include,$(bld_root)/meta/vc8proj.make)
-$(call include,$(bld_root)/meta/vc9proj.make)
-$(call include,$(bld_root)/meta/vc10proj.make)
-$(call include,$(bld_root)/meta/vc11proj.make)
-$(call include,$(bld_root)/meta/vc12proj.make)
-$(call include,$(bld_root)/meta/automake.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): odb_options += --std $(cxx_standard)
-$(call include,$(odb_rules))
-endif
-
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/o-e.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/libcommon/makefile)
diff --git a/pgsql/index/test.std b/pgsql/index/test.std
deleted file mode 100644
index e69de29..0000000
--- a/pgsql/index/test.std
+++ /dev/null
diff --git a/pgsql/index/testscript b/pgsql/index/testscript
new file mode 100644
index 0000000..671a8c3
--- /dev/null
+++ b/pgsql/index/testscript
@@ -0,0 +1,11 @@
+# file : pgsql/index/testscript
+# license : GNU GPL v2; see accompanying LICENSE file
+
+.include ../../database-options.testscript
+.include ../../pgsql.testscript
+
++$create_schema
+
+: basics
+:
+$*
diff --git a/pgsql/makefile b/pgsql/makefile
deleted file mode 100644
index 91520b2..0000000
--- a/pgsql/makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-# file : pgsql/makefile
-# license : GNU GPL; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make
-
-tests := \
-template \
-custom \
-database \
-index \
-native \
-truncation \
-types
-
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests)))
-
-$(dist): name := pgsql
-$(dist): export dirs := $(tests)
-$(dist): export extra_dist := $(name)-vc8.sln $(name)-vc9.sln \
-$(name)-vc10.sln $(name)-vc11.sln $(name)-vc12.sln test.bat
-$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(tests)))
- $(call meta-automake)
- $(call meta-vc8sln1,$(name))
- $(call meta-vc9sln1,$(name))
- $(call meta-vc10sln1,$(name))
- $(call meta-vc11sln1,$(name))
- $(call meta-vc12sln1,$(name))
- $(call meta-vctest,$(name)-vc10.sln,test.bat)
-
-$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests)))
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests)))
-
-$(call include,$(bld_root)/meta/vc8sln.make)
-$(call include,$(bld_root)/meta/vc9sln.make)
-$(call include,$(bld_root)/meta/vc10sln.make)
-$(call include,$(bld_root)/meta/vc11sln.make)
-$(call include,$(bld_root)/meta/vc12sln.make)
-$(call include,$(bld_root)/meta/vctest.make)
-$(call include,$(bld_root)/meta/automake.make)
-
-$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile))
diff --git a/pgsql/native/buildfile b/pgsql/native/buildfile
new file mode 100644
index 0000000..ec4c80c
--- /dev/null
+++ b/pgsql/native/buildfile
@@ -0,0 +1,16 @@
+# file : pgsql/native/buildfile
+# license : GNU GPL v2; see accompanying LICENSE file
+
+assert ($pgsql && !$multi || $build.meta_operation == 'dist') \
+"pgsql should be configured via config.odb_tests.database variable as a single database"
+
+import libs = libodb-pgsql%lib{odb-pgsql}
+import libs += lib{common}
+
+exe{driver}: {hxx cxx}{*} $libs testscript
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
+
+# Testscript's run-time prerequisites.
+#
+exe{driver}: ../../alias{pgsql-client}: include = adhoc
diff --git a/pgsql/native/driver.cxx b/pgsql/native/driver.cxx
index 2cea8dd..843db41 100644
--- a/pgsql/native/driver.cxx
+++ b/pgsql/native/driver.cxx
@@ -4,14 +4,16 @@
// Test PostgreSQL native SQL execution.
//
-#include <memory> // std::auto_ptr
-#include <cassert>
+#include <memory> // std::unique_ptr
#include <iostream>
#include <odb/pgsql/database.hxx>
#include <odb/pgsql/transaction.hxx>
-#include <common/common.hxx>
+#include <libcommon/common.hxx>
+
+#undef NDEBUG
+#include <cassert>
using namespace std;
namespace pgsql = odb::pgsql;
@@ -22,7 +24,7 @@ main (int argc, char* argv[])
{
try
{
- auto_ptr<database> db (create_specific_database<database> (argc, argv));
+ unique_ptr<database> db (create_specific_database<database> (argc, argv));
// Create the database schema.
//
diff --git a/pgsql/native/makefile b/pgsql/native/makefile
deleted file mode 100644
index f82e0fc..0000000
--- a/pgsql/native/makefile
+++ /dev/null
@@ -1,79 +0,0 @@
-# file : pgsql/native/makefile
-# license : GNU GPL v2; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make
-
-cxx_tun := driver.cxx
-cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o))
-cxx_od := $(cxx_obj:.o=.o.d)
-
-common.l := $(out_root)/libcommon/common/common.l
-common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options
-
-# Build.
-#
-$(driver): $(cxx_obj) $(common.l)
-$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base)
-$(cxx_obj) $(cxx_od): $(common.l.cpp-options)
-
-$(call include-dep,$(cxx_od))
-
-# Alias for default target.
-#
-$(out_base)/: $(driver)
-
-# Dist
-#
-$(dist): sources := $(cxx_tun)
-$(dist): data_dist := test.std
-$(dist): export name := $(subst /,-,$(subst $(src_root)/pgsql/,,$(src_base)))
-$(dist): export extra_dist := $(data_dist) \
-$(name)-vc8.vcproj $(name)-vc9.vcproj \
-$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \
-$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \
-$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters
-$(dist):
- $(call dist-data,$(sources) $(data_dist))
- $(call meta-automake,../template/Makefile.am)
- $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj)
- $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj)
- $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj)
- $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj)
- $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj)
-
-# Test.
-#
-$(eval $(call test-schemaless-rule))
-
-# Clean.
-#
-$(clean): \
- $(driver).o.clean \
- $(addsuffix .cxx.clean,$(cxx_obj)) \
- $(addsuffix .cxx.clean,$(cxx_od))
- $(call message,,rm -f $(out_base)/test.out)
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/dist.make)
-$(call include,$(bld_root)/meta/vc8proj.make)
-$(call include,$(bld_root)/meta/vc9proj.make)
-$(call include,$(bld_root)/meta/vc10proj.make)
-$(call include,$(bld_root)/meta/vc11proj.make)
-$(call include,$(bld_root)/meta/vc12proj.make)
-$(call include,$(bld_root)/meta/automake.make)
-
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/o-e.make)
diff --git a/pgsql/native/test.std b/pgsql/native/test.std
deleted file mode 100644
index e69de29..0000000
--- a/pgsql/native/test.std
+++ /dev/null
diff --git a/pgsql/native/testscript b/pgsql/native/testscript
new file mode 100644
index 0000000..4fd9d2c
--- /dev/null
+++ b/pgsql/native/testscript
@@ -0,0 +1,9 @@
+# file : pgsql/custom/testscript
+# license : GNU GPL v2; see accompanying LICENSE file
+
+.include ../../database-options.testscript
+.include ../../pgsql.testscript
+
+: basics
+:
+$*
diff --git a/pgsql/savepoint/driver.cxx b/pgsql/savepoint/driver.cxx
deleted file mode 100644
index 7ac3df0..0000000
--- a/pgsql/savepoint/driver.cxx
+++ /dev/null
@@ -1,58 +0,0 @@
-// file : pgsql/savepoint/driver.cxx
-// license : GNU GPL v2; see accompanying LICENSE file
-
-// Test transaction savepoints.
-//
-
-#include <memory> // std::auto_ptr
-#include <cassert>
-#include <iostream>
-
-#include <odb/pgsql/database.hxx>
-#include <odb/pgsql/transaction.hxx>
-
-#include <common/common.hxx>
-
-#include "test.hxx"
-#include "test-odb.hxx"
-
-using namespace std;
-namespace pgsql = odb::pgsql;
-using namespace pgsql;
-
-int
-main (int argc, char* argv[])
-{
- try
- {
- auto_ptr<database> db (create_specific_database<database> (argc, argv));
-
- {
- object o1 (1);
- object o2 (2);
-
- transaction t (db->begin ());
- db->persist (o1);
-
- /*
- try
- {
- db->persist (o1);
- assert (false);
- }
- catch (const odb::object_already_persistent&)
- {
- }
- */
-
- //db->persist (o2);
-
- t.commit ();
- }
- }
- catch (const odb::exception& e)
- {
- cerr << e.what () << endl;
- return 1;
- }
-}
diff --git a/pgsql/savepoint/makefile b/pgsql/savepoint/makefile
deleted file mode 100644
index f2046f8..0000000
--- a/pgsql/savepoint/makefile
+++ /dev/null
@@ -1,107 +0,0 @@
-# file : pgsql/savepoint/makefile
-# license : GNU GPL v2; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make
-
-cxx_tun := driver.cxx
-odb_hdr := test.hxx
-genf := $(call odb-gen,$(odb_hdr))
-gen := $(addprefix $(out_base)/,$(genf))
-cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) $(filter %.o,$(gen:.cxx=.o))
-cxx_od := $(cxx_obj:.o=.o.d)
-
-common.l := $(out_root)/libcommon/common/common.l
-common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/odb/stub.make,\
- odb: odb,odb-rules: odb_rules)
-
-# Build.
-#
-$(driver): $(cxx_obj) $(common.l)
-$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base)
-$(cxx_obj) $(cxx_od): $(common.l.cpp-options)
-
-$(gen): $(odb)
-$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database pgsql --default-database \
-common --generate-schema --generate-query --table-prefix pgsql_savepoint_
-$(gen): cpp_options := -I$(src_base)
-$(gen): $(common.l.cpp-options)
-
-$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
-
-# Alias for default target.
-#
-$(out_base)/: $(driver)
-
-# Dist
-#
-$(dist): sources := $(cxx_tun)
-$(dist): headers := $(odb_hdr)
-$(dist): data_dist := test.std
-$(dist): export name := $(subst /,-,$(subst $(src_root)/pgsql/,,$(src_base)))
-$(dist): export extra_dist := $(data_dist) \
-$(name)-vc8.vcproj $(name)-vc9.vcproj \
-$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \
-$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \
-$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters
-$(dist):
- $(call dist-data,$(sources) $(headers) $(data_dist))
- $(call meta-automake,../template/Makefile.am)
- $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj)
- $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj)
- $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj)
- $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj)
- $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj)
-
-# Test.
-#
-$(eval $(call test-rule))
-
-# Clean.
-#
-$(clean): \
- $(driver).o.clean \
- $(addsuffix .cxx.clean,$(cxx_obj)) \
- $(addsuffix .cxx.clean,$(cxx_od)) \
- $(addsuffix .hxx.clean,$(filter %.cxx,$(gen)))
- $(call message,,rm -f $(out_base)/test.out)
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/dist.make)
-$(call include,$(bld_root)/meta/vc8proj.make)
-$(call include,$(bld_root)/meta/vc9proj.make)
-$(call include,$(bld_root)/meta/vc10proj.make)
-$(call include,$(bld_root)/meta/vc11proj.make)
-$(call include,$(bld_root)/meta/vc12proj.make)
-$(call include,$(bld_root)/meta/automake.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): odb_options += --std $(cxx_standard)
-$(call include,$(odb_rules))
-endif
-
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/o-e.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/libcommon/makefile)
diff --git a/pgsql/savepoint/test.hxx b/pgsql/savepoint/test.hxx
deleted file mode 100644
index 7e01992..0000000
--- a/pgsql/savepoint/test.hxx
+++ /dev/null
@@ -1,27 +0,0 @@
-// file : pgsql/savepoint/test.hxx
-// license : GNU GPL v2; see accompanying LICENSE file
-
-#ifndef TEST_HXX
-#define TEST_HXX
-
-#include <string>
-
-#include <odb/core.hxx>
-
-#pragma db object bulk(100)
-struct object
-{
- object (unsigned long id)
- : id_ (id)
- {
- }
-
- object ()
- {
- }
-
- #pragma db id
- unsigned long id_;
-};
-
-#endif // TEST_HXX
diff --git a/pgsql/savepoint/test.std b/pgsql/savepoint/test.std
deleted file mode 100644
index e69de29..0000000
--- a/pgsql/savepoint/test.std
+++ /dev/null
diff --git a/pgsql/template/Makefile.am b/pgsql/template/Makefile.am
deleted file mode 100644
index a9c40d3..0000000
--- a/pgsql/template/Makefile.am
+++ /dev/null
@@ -1,34 +0,0 @@
-# file : pgsql/template/Makefile.am
-# license : GNU GPL v2; see accompanying LICENSE file
-
-EXTRA_DIST = __file__(extra_dist)
-
-noinst_PROGRAMS = driver
-driver_SOURCES = driver.cxx __path__(extra_sources) __path__(extra_headers)
-LDADD = $(top_builddir)/libcommon/common/libcommon.la
-AM_CPPFLAGS = -I'$(top_builddir)/libcommon' -I'$(top_srcdir)/libcommon'
-AM_CPPFLAGS += -I'$(builddir)' -I'$(srcdir)'
-
-TESTS=$(top_builddir)/tester
-TESTS_ENVIRONMENT=top_builddir=$(top_builddir); export top_builddir;
-
-__ifelse__(__value__(odb_options),,,
-
-# ODB compilation.
-#
-driver_SOURCES += test.hxx
-nodist_driver_SOURCES = test-odb.cxx
-BUILT_SOURCES = test-odb.hxx
-CLEANFILES = test-odb.hxx test-odb.ixx test-odb.cxx
-
-ODB = @ODB@
-ODBFLAGS = @ODBFLAGS@
-ODBCPPFLAGS = @ODBCPPFLAGS@
-
-if HAVE_CXX11
-ODBFLAGS += --std c++11
-endif
-
-test-odb.hxx: test.hxx
- $(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) __value__(odb_options) $<
-)
diff --git a/pgsql/template/driver.cxx b/pgsql/template/driver.cxx
deleted file mode 100644
index 98ce17a..0000000
--- a/pgsql/template/driver.cxx
+++ /dev/null
@@ -1,40 +0,0 @@
-// file : pgsql/template/driver.cxx
-// license : GNU GPL v2; see accompanying LICENSE file
-
-// PLACE TEST DESCRIPTION HERE
-//
-
-#include <memory> // std::auto_ptr
-#include <cassert>
-#include <iostream>
-
-#include <odb/pgsql/database.hxx>
-#include <odb/pgsql/transaction.hxx>
-
-#include <common/common.hxx>
-
-#include "test.hxx"
-#include "test-odb.hxx"
-
-using namespace std;
-namespace pgsql = odb::pgsql;
-using namespace pgsql;
-
-int
-main (int argc, char* argv[])
-{
- try
- {
- auto_ptr<database> db (create_specific_database<database> (argc, argv));
-
- {
- transaction t (db->begin ());
- t.commit ();
- }
- }
- catch (const odb::exception& e)
- {
- cerr << e.what () << endl;
- return 1;
- }
-}
diff --git a/pgsql/template/makefile b/pgsql/template/makefile
deleted file mode 100644
index 70b23c3..0000000
--- a/pgsql/template/makefile
+++ /dev/null
@@ -1,107 +0,0 @@
-# file : pgsql/template/makefile
-# license : GNU GPL v2; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make
-
-cxx_tun := driver.cxx
-odb_hdr := test.hxx
-genf := $(call odb-gen,$(odb_hdr))
-gen := $(addprefix $(out_base)/,$(genf))
-cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) $(filter %.o,$(gen:.cxx=.o))
-cxx_od := $(cxx_obj:.o=.o.d)
-
-common.l := $(out_root)/libcommon/common/common.l
-common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/odb/stub.make,\
- odb: odb,odb-rules: odb_rules)
-
-# Build.
-#
-$(driver): $(cxx_obj) $(common.l)
-$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base)
-$(cxx_obj) $(cxx_od): $(common.l.cpp-options)
-
-$(gen): $(odb)
-$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database pgsql --default-database \
-common --generate-schema --table-prefix pgsql_template_ #@@ CHANGE THIS
-$(gen): cpp_options := -I$(src_base)
-$(gen): $(common.l.cpp-options)
-
-$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
-
-# Alias for default target.
-#
-$(out_base)/: $(driver)
-
-# Dist
-#
-$(dist): sources := $(cxx_tun)
-$(dist): headers := $(odb_hdr)
-$(dist): data_dist := test.std
-$(dist): export name := $(subst /,-,$(subst $(src_root)/pgsql/,,$(src_base)))
-$(dist): export extra_dist := $(data_dist) \
-$(name)-vc8.vcproj $(name)-vc9.vcproj \
-$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \
-$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \
-$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters
-$(dist):
- $(call dist-data,$(sources) $(headers) $(data_dist))
- $(call meta-automake,../template/Makefile.am)
- $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj)
- $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj)
- $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj)
- $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj)
- $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj)
-
-# Test.
-#
-$(eval $(call test-rule))
-
-# Clean.
-#
-$(clean): \
- $(driver).o.clean \
- $(addsuffix .cxx.clean,$(cxx_obj)) \
- $(addsuffix .cxx.clean,$(cxx_od)) \
- $(addsuffix .hxx.clean,$(filter %.cxx,$(gen)))
- $(call message,,rm -f $(out_base)/test.out)
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/dist.make)
-$(call include,$(bld_root)/meta/vc8proj.make)
-$(call include,$(bld_root)/meta/vc9proj.make)
-$(call include,$(bld_root)/meta/vc10proj.make)
-$(call include,$(bld_root)/meta/vc11proj.make)
-$(call include,$(bld_root)/meta/vc12proj.make)
-$(call include,$(bld_root)/meta/automake.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): odb_options += --std $(cxx_standard)
-$(call include,$(odb_rules))
-endif
-
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/o-e.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/libcommon/makefile)
diff --git a/pgsql/template/template-vc10.vcxproj b/pgsql/template/template-vc10.vcxproj
deleted file mode 100644
index 4bf096a..0000000
--- a/pgsql/template/template-vc10.vcxproj
+++ /dev/null
@@ -1,180 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{__uuid__()}</ProjectGuid>
- <Keyword>Win32Proj</Keyword>
- <RootNamespace>__value__(name)</RootNamespace>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <LinkIncremental>true</LinkIncremental>
- <OutDir>$(Configuration)\</OutDir>
- <TargetName>driver</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <LinkIncremental>true</LinkIncremental>
- <OutDir>$(Platform)\$(Configuration)\</OutDir>
- <TargetName>driver</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <LinkIncremental>false</LinkIncremental>
- <OutDir>$(Configuration)\</OutDir>
- <TargetName>driver</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <LinkIncremental>false</LinkIncremental>
- <OutDir>$(Platform)\$(Configuration)\</OutDir>
- <TargetName>driver</TargetName>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories>
- <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib\common-d.lib;odb-pgsql-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories>
- <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib64\common-d.lib;odb-pgsql-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories>
- <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib\common.lib;odb-pgsql.lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories>
- <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib64\common.lib;odb-pgsql.lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- </Link>
- </ItemDefinitionGroup>
-__ifelse__(__value__(odb_options),,,
-m4_dnl
- <ItemGroup>
-__custom_build_entry__(
-test.hxx,
-odb test.hxx,
-odb.exe --std c++11 __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\libcommon)) test.hxx,
-test-odb.hxx;test-odb.ixx;test-odb.cxx)
- </ItemGroup>)
- <ItemGroup>
-__ifelse__(__value__(odb_options),,,
-__header_entry__(test-odb.hxx)
-__header_entry__(test-odb.ixx))
-__header_entries__(extra_headers)
- </ItemGroup>
- <ItemGroup>
-__source_entry__(driver.cxx)
-__ifelse__(__value__(odb_options),,,__source_entry__(test-odb.cxx))
-__source_entries__(extra_sources)
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
diff --git a/pgsql/template/template-vc10.vcxproj.filters b/pgsql/template/template-vc10.vcxproj.filters
deleted file mode 100644
index 8ac18a3..0000000
--- a/pgsql/template/template-vc10.vcxproj.filters
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{__uuid__()}</UniqueIdentifier>
- <Extensions>cxx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{__uuid__()}</UniqueIdentifier>
- <Extensions>h;hxx;ixx;txx</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
-__ifelse__(__value__(odb_options),,,
-__header_filter_entry__(test.hxx)
-__header_filter_entry__(test-odb.hxx)
-__header_filter_entry__(test-odb.ixx))
-__header_filter_entries__(extra_headers)
- </ItemGroup>
- <ItemGroup>
-__source_filter_entry__(driver.cxx)
-__ifelse__(__value__(odb_options),,,__source_filter_entry__(test-odb.cxx))
-__source_filter_entries__(extra_sources)
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/pgsql/template/template-vc11.vcxproj b/pgsql/template/template-vc11.vcxproj
deleted file mode 100644
index 9e7c682..0000000
--- a/pgsql/template/template-vc11.vcxproj
+++ /dev/null
@@ -1,184 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{__uuid__()}</ProjectGuid>
- <Keyword>Win32Proj</Keyword>
- <RootNamespace>__value__(name)</RootNamespace>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <LinkIncremental>true</LinkIncremental>
- <OutDir>$(Configuration)\</OutDir>
- <TargetName>driver</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <LinkIncremental>true</LinkIncremental>
- <OutDir>$(Platform)\$(Configuration)\</OutDir>
- <TargetName>driver</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <LinkIncremental>false</LinkIncremental>
- <OutDir>$(Configuration)\</OutDir>
- <TargetName>driver</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <LinkIncremental>false</LinkIncremental>
- <OutDir>$(Platform)\$(Configuration)\</OutDir>
- <TargetName>driver</TargetName>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories>
- <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib\common-d.lib;odb-pgsql-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories>
- <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib64\common-d.lib;odb-pgsql-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories>
- <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib\common.lib;odb-pgsql.lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories>
- <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib64\common.lib;odb-pgsql.lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- </Link>
- </ItemDefinitionGroup>
-__ifelse__(__value__(odb_options),,,
-m4_dnl
- <ItemGroup>
-__custom_build_entry__(
-test.hxx,
-odb test.hxx,
-odb.exe --std c++11 __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1700 -I$(SolutionDir)\..\libcommon)) test.hxx,
-test-odb.hxx;test-odb.ixx;test-odb.cxx)
- </ItemGroup>)
- <ItemGroup>
-__ifelse__(__value__(odb_options),,,
-__header_entry__(test-odb.hxx)
-__header_entry__(test-odb.ixx))
-__header_entries__(extra_headers)
- </ItemGroup>
- <ItemGroup>
-__source_entry__(driver.cxx)
-__ifelse__(__value__(odb_options),,,__source_entry__(test-odb.cxx))
-__source_entries__(extra_sources)
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
diff --git a/pgsql/template/template-vc11.vcxproj.filters b/pgsql/template/template-vc11.vcxproj.filters
deleted file mode 100644
index 8ac18a3..0000000
--- a/pgsql/template/template-vc11.vcxproj.filters
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{__uuid__()}</UniqueIdentifier>
- <Extensions>cxx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{__uuid__()}</UniqueIdentifier>
- <Extensions>h;hxx;ixx;txx</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
-__ifelse__(__value__(odb_options),,,
-__header_filter_entry__(test.hxx)
-__header_filter_entry__(test-odb.hxx)
-__header_filter_entry__(test-odb.ixx))
-__header_filter_entries__(extra_headers)
- </ItemGroup>
- <ItemGroup>
-__source_filter_entry__(driver.cxx)
-__ifelse__(__value__(odb_options),,,__source_filter_entry__(test-odb.cxx))
-__source_filter_entries__(extra_sources)
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/pgsql/template/template-vc12.vcxproj b/pgsql/template/template-vc12.vcxproj
deleted file mode 100644
index 415dad4..0000000
--- a/pgsql/template/template-vc12.vcxproj
+++ /dev/null
@@ -1,188 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{__uuid__()}</ProjectGuid>
- <Keyword>Win32Proj</Keyword>
- <RootNamespace>__value__(name)</RootNamespace>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v120</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v120</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <LinkIncremental>true</LinkIncremental>
- <OutDir>$(Configuration)\</OutDir>
- <TargetName>driver</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <LinkIncremental>true</LinkIncremental>
- <OutDir>$(Platform)\$(Configuration)\</OutDir>
- <TargetName>driver</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <LinkIncremental>false</LinkIncremental>
- <OutDir>$(Configuration)\</OutDir>
- <TargetName>driver</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <LinkIncremental>false</LinkIncremental>
- <OutDir>$(Platform)\$(Configuration)\</OutDir>
- <TargetName>driver</TargetName>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories>
- <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib\common-d.lib;odb-pgsql-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories>
- <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib64\common-d.lib;odb-pgsql-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories>
- <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib\common.lib;odb-pgsql.lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories>
- <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib64\common.lib;odb-pgsql.lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- </Link>
- </ItemDefinitionGroup>
-__ifelse__(__value__(odb_options),,,
-m4_dnl
- <ItemGroup>
-__custom_build_entry__(
-test.hxx,
-odb test.hxx,
-odb.exe --std c++11 __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1700 -I$(SolutionDir)\..\libcommon)) test.hxx,
-test-odb.hxx;test-odb.ixx;test-odb.cxx)
- </ItemGroup>)
- <ItemGroup>
-__ifelse__(__value__(odb_options),,,
-__header_entry__(test-odb.hxx)
-__header_entry__(test-odb.ixx))
-__header_entries__(extra_headers)
- </ItemGroup>
- <ItemGroup>
-__source_entry__(driver.cxx)
-__ifelse__(__value__(odb_options),,,__source_entry__(test-odb.cxx))
-__source_entries__(extra_sources)
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
diff --git a/pgsql/template/template-vc12.vcxproj.filters b/pgsql/template/template-vc12.vcxproj.filters
deleted file mode 100644
index 8ac18a3..0000000
--- a/pgsql/template/template-vc12.vcxproj.filters
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{__uuid__()}</UniqueIdentifier>
- <Extensions>cxx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{__uuid__()}</UniqueIdentifier>
- <Extensions>h;hxx;ixx;txx</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
-__ifelse__(__value__(odb_options),,,
-__header_filter_entry__(test.hxx)
-__header_filter_entry__(test-odb.hxx)
-__header_filter_entry__(test-odb.ixx))
-__header_filter_entries__(extra_headers)
- </ItemGroup>
- <ItemGroup>
-__source_filter_entry__(driver.cxx)
-__ifelse__(__value__(odb_options),,,__source_filter_entry__(test-odb.cxx))
-__source_filter_entries__(extra_sources)
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/pgsql/template/template-vc8.vcproj b/pgsql/template/template-vc8.vcproj
deleted file mode 100644
index 3b2bbc3..0000000
--- a/pgsql/template/template-vc8.vcproj
+++ /dev/null
@@ -1,354 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="__value__(name)"
- ProjectGUID="{__uuid__()}"
- RootNamespace="__value__(name)"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/wd4068 /wd4355 /wd4800 /wd4290"
- Optimization="0"
- AdditionalIncludeDirectories="$(SolutionDir)\..\libcommon"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(SolutionDir)\..\libcommon\lib\common-d.lib odb-pgsql-d.lib odb-d.lib"
- OutputFile="$(OutDir)\driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/wd4068 /wd4355 /wd4800 /wd4290"
- AdditionalIncludeDirectories="$(SolutionDir)\..\libcommon"
- PreprocessorDefinitions="WIN32;_CONSOLE;HAVE_CONFIG_VC_H"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(SolutionDir)\..\libcommon\lib\common.lib odb-pgsql.lib odb.lib"
- OutputFile="$(OutDir)\driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/wd4068 /wd4355 /wd4800 /wd4290"
- Optimization="0"
- AdditionalIncludeDirectories="$(SolutionDir)\..\libcommon"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(SolutionDir)\..\libcommon\lib64\common-d.lib odb-pgsql-d.lib odb-d.lib"
- OutputFile="$(OutDir)\driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/wd4068 /wd4355 /wd4800 /wd4290"
- AdditionalIncludeDirectories="$(SolutionDir)\..\libcommon"
- PreprocessorDefinitions="WIN32;_CONSOLE;HAVE_CONFIG_VC_H"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(SolutionDir)\..\libcommon\lib64\common.lib odb-pgsql.lib odb.lib"
- OutputFile="$(OutDir)\driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cxx"
- UniqueIdentifier="{__uuid__()}"
- >
-__source_entry__(driver.cxx)
-__ifelse__(__value__(odb_options),,,__source_entry__(test-odb.cxx))
-__source_entries__(extra_sources)
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hxx;ixx;txx"
- UniqueIdentifier="{__uuid__()}"
- >
-__ifelse__(__value__(odb_options),,,
-__file_entry_custom_build__(
-test.hxx,
-odb test.hxx,
-odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1400 -I$(SolutionDir)\..\libcommon)) test.hxx,
-test-odb.hxx;test-odb.ixx;test-odb.cxx)
-__file_entry__(test-odb.hxx)
-__file_entry__(test-odb.ixx))
-__file_entries__(extra_headers)
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/pgsql/template/template-vc9.vcproj b/pgsql/template/template-vc9.vcproj
deleted file mode 100644
index 3a75a38..0000000
--- a/pgsql/template/template-vc9.vcproj
+++ /dev/null
@@ -1,361 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="__value__(name)"
- ProjectGUID="{__uuid__()}"
- RootNamespace="__value__(name)"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/wd4068 /wd4355 /wd4800 /wd4290"
- Optimization="0"
- AdditionalIncludeDirectories="$(SolutionDir)\..\libcommon"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(SolutionDir)\..\libcommon\lib\common-d.lib odb-pgsql-d.lib odb-d.lib"
- OutputFile="$(OutDir)\driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/wd4068 /wd4355 /wd4800 /wd4290"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="$(SolutionDir)\..\libcommon"
- PreprocessorDefinitions="WIN32;_CONSOLE;HAVE_CONFIG_VC_H"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(SolutionDir)\..\libcommon\lib\common.lib odb-pgsql.lib odb.lib"
- OutputFile="$(OutDir)\driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/wd4068 /wd4355 /wd4800 /wd4290"
- Optimization="0"
- AdditionalIncludeDirectories="$(SolutionDir)\..\libcommon"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(SolutionDir)\..\libcommon\lib64\common-d.lib odb-pgsql-d.lib odb-d.lib"
- OutputFile="$(OutDir)\driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/wd4068 /wd4355 /wd4800 /wd4290"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="$(SolutionDir)\..\libcommon"
- PreprocessorDefinitions="WIN32;_CONSOLE;HAVE_CONFIG_VC_H"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(SolutionDir)\..\libcommon\lib64\common.lib odb-pgsql.lib odb.lib"
- OutputFile="$(OutDir)\driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cxx"
- UniqueIdentifier="{__uuid__()}"
- >
-__source_entry__(driver.cxx)
-__ifelse__(__value__(odb_options),,,__source_entry__(test-odb.cxx))
-__source_entries__(extra_sources)
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hxx;ixx;txx"
- UniqueIdentifier="{__uuid__()}"
- >
-__ifelse__(__value__(odb_options),,,
-__file_entry_custom_build__(
-test.hxx,
-odb test.hxx,
-odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1500 -I$(SolutionDir)\..\libcommon)) test.hxx,
-test-odb.hxx;test-odb.ixx;test-odb.cxx)
-__file_entry__(test-odb.hxx)
-__file_entry__(test-odb.ixx))
-__file_entries__(extra_headers)
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/pgsql/template/test.hxx b/pgsql/template/test.hxx
deleted file mode 100644
index 01670b1..0000000
--- a/pgsql/template/test.hxx
+++ /dev/null
@@ -1,25 +0,0 @@
-// file : pgsql/template/test.hxx
-// license : GNU GPL v2; see accompanying LICENSE file
-
-#ifndef TEST_HXX
-#define TEST_HXX
-
-#include <odb/core.hxx>
-
-#pragma db object
-struct object
-{
- object (unsigned long id)
- : id_ (id)
- {
- }
-
- object ()
- {
- }
-
- #pragma db id
- unsigned long id_;
-};
-
-#endif // TEST_HXX
diff --git a/pgsql/template/test.std b/pgsql/template/test.std
deleted file mode 100644
index e69de29..0000000
--- a/pgsql/template/test.std
+++ /dev/null
diff --git a/pgsql/test.bat b/pgsql/test.bat
deleted file mode 100644
index 6b4dd61..0000000
--- a/pgsql/test.bat
+++ /dev/null
@@ -1,68 +0,0 @@
-@echo off
-rem file : pgsql/test.bat
-rem license : GNU GPL v2; see accompanying LICENSE file
-
-setlocal
-
-set "tests=__path__(dirs)"
-set "confs=__path__(configurations)"
-set "plats=__path__(platforms)"
-set "curdir=%CD%"
-set "topdir=%curdir%\.."
-set "failed="
-
-goto start
-
-rem
-rem %1 - test directory
-rem %2 - configuration
-rem %3 - platform
-rem
-:run_test
- cd %1
-
- if "_%3_" == "_Win32_" (
- set "dir=%2"
- ) else (
- set "dir=%3\%2"
- )
-
- if exist %dir%\driver.exe (
- echo %1\%3\%2
- call %topdir%\tester.bat pgsql %2 %3
- if errorlevel 1 (
- set "failed=%failed% %1\%3\%2"
- )
- )
-
- cd %curdir%
-goto :eof
-
-:start
-
-for %%t in (%tests%) do (
- for %%c in (%confs%) do (
- for %%p in (%plats%) do (
- call :run_test %%t %%c %%p
- )
- )
-)
-
-if not "_%failed%_" == "__" goto error
-
-echo.
-echo ALL TESTS PASSED
-echo.
-goto end
-
-:error
-if not "_%failed%_" == "__" (
- echo.
- for %%t in (%failed%) do echo FAILED: %%t
- echo.
-)
-endlocal
-exit /b 1
-
-:end
-endlocal
diff --git a/pgsql/truncation/buildfile b/pgsql/truncation/buildfile
new file mode 100644
index 0000000..2f2f3a2
--- /dev/null
+++ b/pgsql/truncation/buildfile
@@ -0,0 +1,35 @@
+# file : pgsql/truncation/buildfile
+# license : GNU GPL v2; see accompanying LICENSE file
+
+assert ($pgsql && !$multi || $build.meta_operation == 'dist') \
+"pgsql should be configured via config.odb_tests.database variable as a single database"
+
+import libodb = libodb%lib{odb}
+
+import libs = libodb-pgsql%lib{odb-pgsql}
+import libs += lib{common}
+
+exe{driver}: {hxx cxx}{* -*-odb} {hxx ixx cxx}{test-odb} testscript
+
+# Introduce the metadata library target to make sure the libodb library is
+# resolved for the odb_compile ad hoc rule (see build/root.build for details).
+#
+libue{test-meta}: $libodb
+
+<{hxx ixx cxx}{test-odb}>: hxx{test} libue{test-meta}
+
+exe{driver}: libue{test-meta} $libs
+
+# Specify the ODB custom options to be used by the odb_compile ad hoc rule
+# (see build/root.build for details).
+#
+odb_options = --table-prefix pgsql_truncation_ \
+ --generate-schema \
+ --default-database common \
+ --generate-query
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
+
+# Testscript's run-time prerequisites.
+#
+exe{driver}: ../../alias{pgsql-client}: include = adhoc
diff --git a/pgsql/truncation/driver.cxx b/pgsql/truncation/driver.cxx
index 63135d4..337a26e 100644
--- a/pgsql/truncation/driver.cxx
+++ b/pgsql/truncation/driver.cxx
@@ -4,18 +4,20 @@
// Test insufficient buffer/truncation handling.
//
-#include <memory> // std::auto_ptr
-#include <cassert>
+#include <memory> // std::unique_ptr
#include <iostream>
#include <odb/pgsql/database.hxx>
#include <odb/pgsql/transaction.hxx>
-#include <common/common.hxx>
+#include <libcommon/common.hxx>
#include "test.hxx"
#include "test-odb.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
namespace pgsql = odb::pgsql;
using namespace pgsql;
@@ -33,7 +35,7 @@ main (int argc, char* argv[])
// Test basic operations.
//
{
- auto_ptr<database> db (create_specific_database<database> (argc, argv));
+ unique_ptr<database> db (create_specific_database<database> (argc, argv));
// Run persist/load so that the initial bindings are established
// (version == 0).
@@ -71,7 +73,7 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
- auto_ptr<object2> o (db->load<object2> (3));
+ unique_ptr<object2> o (db->load<object2> (3));
assert (o->str_ == long_str);
t.commit ();
}
@@ -89,7 +91,7 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
- auto_ptr<object2> o (db->load<object2> (3));
+ unique_ptr<object2> o (db->load<object2> (3));
assert (o->str_ == longer_str);
t.commit ();
}
@@ -101,7 +103,7 @@ main (int argc, char* argv[])
typedef pgsql::query<object1> query;
typedef odb::result<object1> result;
- auto_ptr<database> db (create_specific_database<database> (argc, argv));
+ unique_ptr<database> db (create_specific_database<database> (argc, argv));
// Run persist/query so that the initial bindings are established
// (version == 0).
diff --git a/pgsql/truncation/makefile b/pgsql/truncation/makefile
deleted file mode 100644
index 9519291..0000000
--- a/pgsql/truncation/makefile
+++ /dev/null
@@ -1,107 +0,0 @@
-# file : pgsql/truncation/makefile
-# license : GNU GPL v2; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make
-
-cxx_tun := driver.cxx
-odb_hdr := test.hxx
-genf := $(call odb-gen,$(odb_hdr))
-gen := $(addprefix $(out_base)/,$(genf))
-cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) $(filter %.o,$(gen:.cxx=.o))
-cxx_od := $(cxx_obj:.o=.o.d)
-
-common.l := $(out_root)/libcommon/common/common.l
-common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/odb/stub.make,\
- odb: odb,odb-rules: odb_rules)
-
-# Build.
-#
-$(driver): $(cxx_obj) $(common.l)
-$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base)
-$(cxx_obj) $(cxx_od): $(common.l.cpp-options)
-
-$(gen): $(odb)
-$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database pgsql --default-database \
-common --generate-schema --generate-query --table-prefix pgsql_truncation_
-$(gen): cpp_options := -I$(src_base)
-$(gen): $(common.l.cpp-options)
-
-$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
-
-# Alias for default target.
-#
-$(out_base)/: $(driver)
-
-# Dist
-#
-$(dist): sources := $(cxx_tun)
-$(dist): headers := $(odb_hdr)
-$(dist): data_dist := test.std
-$(dist): export name := $(subst /,-,$(subst $(src_root)/pgsql/,,$(src_base)))
-$(dist): export extra_dist := $(data_dist) \
-$(name)-vc8.vcproj $(name)-vc9.vcproj \
-$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \
-$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \
-$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters
-$(dist):
- $(call dist-data,$(sources) $(headers) $(data_dist))
- $(call meta-automake,../template/Makefile.am)
- $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj)
- $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj)
- $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj)
- $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj)
- $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj)
-
-# Test.
-#
-$(eval $(call test-rule))
-
-# Clean.
-#
-$(clean): \
- $(driver).o.clean \
- $(addsuffix .cxx.clean,$(cxx_obj)) \
- $(addsuffix .cxx.clean,$(cxx_od)) \
- $(addsuffix .hxx.clean,$(filter %.cxx,$(gen)))
- $(call message,,rm -f $(out_base)/test.out)
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/dist.make)
-$(call include,$(bld_root)/meta/vc8proj.make)
-$(call include,$(bld_root)/meta/vc9proj.make)
-$(call include,$(bld_root)/meta/vc10proj.make)
-$(call include,$(bld_root)/meta/vc11proj.make)
-$(call include,$(bld_root)/meta/vc12proj.make)
-$(call include,$(bld_root)/meta/automake.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): odb_options += --std $(cxx_standard)
-$(call include,$(odb_rules))
-endif
-
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/o-e.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/libcommon/makefile)
diff --git a/pgsql/truncation/test.std b/pgsql/truncation/test.std
deleted file mode 100644
index e69de29..0000000
--- a/pgsql/truncation/test.std
+++ /dev/null
diff --git a/pgsql/truncation/testscript b/pgsql/truncation/testscript
new file mode 100644
index 0000000..c57b723
--- /dev/null
+++ b/pgsql/truncation/testscript
@@ -0,0 +1,11 @@
+# file : pgsql/truncation/testscript
+# license : GNU GPL v2; see accompanying LICENSE file
+
+.include ../../database-options.testscript
+.include ../../pgsql.testscript
+
++$create_schema
+
+: basics
+:
+$*
diff --git a/pgsql/types/buildfile b/pgsql/types/buildfile
new file mode 100644
index 0000000..64f0c02
--- /dev/null
+++ b/pgsql/types/buildfile
@@ -0,0 +1,36 @@
+# file : pgsql/types/buildfile
+# license : GNU GPL v2; see accompanying LICENSE file
+
+assert ($pgsql && !$multi || $build.meta_operation == 'dist') \
+"pgsql should be configured via config.odb_tests.database variable as a single database"
+
+import libodb = libodb%lib{odb}
+import libcommon = lib{common}
+import libs = libodb-pgsql%lib{odb-pgsql}
+
+exe{driver}: {hxx cxx}{* -*-odb} {hxx ixx cxx}{test-odb} testscript
+
+# Introduce the metadata library target to make sure the libodb and libcommon
+# libraries are resolved for the odb_compile ad hoc rule (see build/root.build
+# for details).
+#
+libue{test-meta}: $libodb $libcommon
+
+<{hxx ixx cxx}{test-odb}>: hxx{test} libue{test-meta}
+
+exe{driver}: libue{test-meta} $libs
+
+# Specify the ODB custom options to be used by the odb_compile ad hoc rule
+# (see build/root.build for details).
+#
+odb_options = --table-prefix pgsql_types_ \
+ --generate-schema \
+ --default-database common \
+ --generate-query \
+ --cxx-prologue '#include "traits.hxx"'
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
+
+# Testscript's run-time prerequisites.
+#
+exe{driver}: ../../alias{pgsql-client}: include = adhoc
diff --git a/pgsql/types/driver.cxx b/pgsql/types/driver.cxx
index c2b54be..710f601 100644
--- a/pgsql/types/driver.cxx
+++ b/pgsql/types/driver.cxx
@@ -4,18 +4,20 @@
// Test PostgreSQL type conversion.
//
-#include <memory> // std::auto_ptr
-#include <cassert>
+#include <memory> // std::unique_ptr
#include <iostream>
#include <odb/pgsql/database.hxx>
#include <odb/pgsql/transaction.hxx>
-#include <common/common.hxx>
+#include <libcommon/common.hxx>
#include "test.hxx"
#include "test-odb.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
namespace pgsql = odb::pgsql;
using namespace pgsql;
@@ -25,7 +27,7 @@ main (int argc, char* argv[])
{
try
{
- auto_ptr<database> db (create_specific_database<database> (argc, argv));
+ unique_ptr<database> db (create_specific_database<database> (argc, argv));
object o (1);
@@ -79,7 +81,7 @@ main (int argc, char* argv[])
//
{
transaction t (db->begin ());
- auto_ptr<object> o1 (db->load<object> (1));
+ unique_ptr<object> o1 (db->load<object> (1));
t.commit ();
assert (o == *o1);
@@ -144,9 +146,9 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
- auto_ptr<char_array> p1 (db->load<char_array> (1));
- auto_ptr<char_array> p2 (db->load<char_array> (2));
- auto_ptr<char_array> p3 (db->load<char_array> (3));
+ unique_ptr<char_array> p1 (db->load<char_array> (1));
+ unique_ptr<char_array> p2 (db->load<char_array> (2));
+ unique_ptr<char_array> p3 (db->load<char_array> (3));
t.commit ();
assert (o1 == *p1);
diff --git a/pgsql/types/makefile b/pgsql/types/makefile
deleted file mode 100644
index c3321b7..0000000
--- a/pgsql/types/makefile
+++ /dev/null
@@ -1,109 +0,0 @@
-# file : pgsql/types/makefile
-# license : GNU GPL v2; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make
-
-cxx_tun := driver.cxx
-odb_hdr := test.hxx
-genf := $(call odb-gen,$(odb_hdr))
-gen := $(addprefix $(out_base)/,$(genf))
-cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) $(filter %.o,$(gen:.cxx=.o))
-cxx_od := $(cxx_obj:.o=.o.d)
-
-common.l := $(out_root)/libcommon/common/common.l
-common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/odb/stub.make,\
- odb: odb,odb-rules: odb_rules)
-
-# Build.
-#
-$(driver): $(cxx_obj) $(common.l)
-$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base)
-$(cxx_obj) $(cxx_od): $(common.l.cpp-options)
-
-$(gen): $(odb)
-$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database pgsql --default-database \
-common --generate-schema --generate-query --cxx-prologue \
-'\#include "traits.hxx"' --table-prefix pgsql_types_
-$(gen): cpp_options := -I$(src_base)
-$(gen): $(common.l.cpp-options)
-
-$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
-
-# Alias for default target.
-#
-$(out_base)/: $(driver)
-
-# Dist
-#
-$(dist): sources := $(cxx_tun)
-$(dist): headers := $(odb_hdr)
-$(dist): export extra_headers := traits.hxx
-$(dist): data_dist := test.std
-$(dist): export name := $(subst /,-,$(subst $(src_root)/pgsql/,,$(src_base)))
-$(dist): export extra_dist := $(data_dist) \
-$(name)-vc8.vcproj $(name)-vc9.vcproj \
-$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \
-$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \
-$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters
-$(dist):
- $(call dist-data,$(sources) $(headers) $(extra_headers) $(data_dist))
- $(call meta-automake,../template/Makefile.am)
- $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj)
- $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj)
- $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj)
- $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj)
- $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj)
-
-# Test.
-#
-$(eval $(call test-rule))
-
-# Clean.
-#
-$(clean): \
- $(driver).o.clean \
- $(addsuffix .cxx.clean,$(cxx_obj)) \
- $(addsuffix .cxx.clean,$(cxx_od)) \
- $(addsuffix .hxx.clean,$(filter %.cxx,$(gen)))
- $(call message,,rm -f $(out_base)/test.out)
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/dist.make)
-$(call include,$(bld_root)/meta/vc8proj.make)
-$(call include,$(bld_root)/meta/vc9proj.make)
-$(call include,$(bld_root)/meta/vc10proj.make)
-$(call include,$(bld_root)/meta/vc11proj.make)
-$(call include,$(bld_root)/meta/vc12proj.make)
-$(call include,$(bld_root)/meta/automake.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): odb_options += --std $(cxx_standard)
-$(call include,$(odb_rules))
-endif
-
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/o-e.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/libcommon/makefile)
diff --git a/pgsql/types/test.hxx b/pgsql/types/test.hxx
index f44d73e..462ebad 100644
--- a/pgsql/types/test.hxx
+++ b/pgsql/types/test.hxx
@@ -7,13 +7,13 @@
#include <set>
#include <string>
#include <vector>
-#include <memory> // std::auto_ptr
+#include <memory> // std::unique_ptr
#include <cstring> // std::memcmp, std::memcpy, std::str[n]cmp, std::strlen
#include <cstddef> // std::size_t
#include <odb/core.hxx>
-#include <common/buffer.hxx>
+#include <libcommon/buffer.hxx>
struct bitfield
{
@@ -71,7 +71,7 @@ operator== (const varbit& x, const varbit& y)
#pragma db value(bitfield) type ("BIT(4)")
-typedef std::auto_ptr<std::string> string_ptr;
+typedef std::unique_ptr<std::string> string_ptr;
enum color {red, green, blue};
diff --git a/pgsql/types/test.std b/pgsql/types/test.std
deleted file mode 100644
index e69de29..0000000
--- a/pgsql/types/test.std
+++ /dev/null
diff --git a/pgsql/types/testscript b/pgsql/types/testscript
new file mode 100644
index 0000000..57218e1
--- /dev/null
+++ b/pgsql/types/testscript
@@ -0,0 +1,11 @@
+# file : pgsql/types/testscript
+# license : GNU GPL v2; see accompanying LICENSE file
+
+.include ../../database-options.testscript
+.include ../../pgsql.testscript
+
++$create_schema
+
+: basics
+:
+$*