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/mssql | |
parent | 4bf55482207ee5807907833829dc30af2d18770b (diff) |
Implement bulk API code generation
Diffstat (limited to 'odb/relational/mssql')
-rw-r--r-- | odb/relational/mssql/context.cxx | 1 | ||||
-rw-r--r-- | odb/relational/mssql/header.cxx | 12 |
2 files changed, 10 insertions, 3 deletions
diff --git a/odb/relational/mssql/context.cxx b/odb/relational/mssql/context.cxx index a0037eb..e99cdaf 100644 --- a/odb/relational/mssql/context.cxx +++ b/odb/relational/mssql/context.cxx @@ -89,6 +89,7 @@ namespace relational insert_send_auto_id = false; delay_freeing_statement_result = true; need_image_clone = true; + generate_bulk = true; global_index = false; global_fkey = true; data_->bind_vector_ = "mssql::bind*"; diff --git a/odb/relational/mssql/header.cxx b/odb/relational/mssql/header.cxx index 40b6828..3bc2cbd 100644 --- a/odb/relational/mssql/header.cxx +++ b/odb/relational/mssql/header.cxx @@ -31,10 +31,16 @@ namespace relational if (poly_derived || (abst && !poly)) return; - // batch + // Bulk operations batch size. // - os << "static const std::size_t batch = 1UL;" - << endl; + { + unsigned long long b (c.count ("bulk") + ? c.get<unsigned long long> ("bulk") + : 1); + + os << "static const std::size_t batch = " << b << "UL;" + << endl; + } // rowvesion // |