diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-06-21 12:52:18 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-06-29 13:11:59 +0200 |
commit | a87c149915fa5a262bd797df1c2a4e756420d413 (patch) | |
tree | 620bfe6a33af12e84030139a8fa53d8ecf0de669 /odb/relational/pgsql/header.cxx | |
parent | 371ec576553528fc7b8532bf00673cb222836349 (diff) |
Add support for bulk operations in PostgreSQL 14
Diffstat (limited to 'odb/relational/pgsql/header.cxx')
-rw-r--r-- | odb/relational/pgsql/header.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/odb/relational/pgsql/header.cxx b/odb/relational/pgsql/header.cxx index ff00eaa..c3efc3e 100644 --- a/odb/relational/pgsql/header.cxx +++ b/odb/relational/pgsql/header.cxx @@ -87,6 +87,20 @@ namespace relational } os << endl; + + if (poly_derived) + return; + + // Bulk operations batch size. + // + { + unsigned long long b (c.count ("bulk") + ? c.get<unsigned long long> ("bulk") + : 1); + + os << "static const std::size_t batch = " << b << "UL;" + << endl; + } } virtual void |