diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2014-11-19 11:51:17 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2014-11-19 11:51:17 +0200 |
commit | e85b07722107d00e4a3182ff4d33274a617bb55a (patch) | |
tree | df3e58ea27935b29813f18b976b05a4c095c73bb /odb/relational/oracle | |
parent | 4bf55482207ee5807907833829dc30af2d18770b (diff) |
Implement bulk API code generation
Diffstat (limited to 'odb/relational/oracle')
-rw-r--r-- | odb/relational/oracle/context.cxx | 1 | ||||
-rw-r--r-- | odb/relational/oracle/header.cxx | 12 |
2 files changed, 11 insertions, 2 deletions
diff --git a/odb/relational/oracle/context.cxx b/odb/relational/oracle/context.cxx index 98cda52..be97796 100644 --- a/odb/relational/oracle/context.cxx +++ b/odb/relational/oracle/context.cxx @@ -85,6 +85,7 @@ namespace relational insert_send_auto_id = false; delay_freeing_statement_result = false; need_image_clone = true; + generate_bulk = true; global_index = true; global_fkey = true; data_->bind_vector_ = "oracle::bind*"; diff --git a/odb/relational/oracle/header.cxx b/odb/relational/oracle/header.cxx index 1004a4c..055ef7b 100644 --- a/odb/relational/oracle/header.cxx +++ b/odb/relational/oracle/header.cxx @@ -243,8 +243,16 @@ namespace relational if (poly_derived || (abst && !poly)) return; - os << "static const std::size_t batch = 1UL;" - << endl; + // 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; + } } }; entry<class1> class1_entry_; |