aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-11-26 15:04:56 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-11-26 15:04:56 +0200
commit2cc27fd753dfb53bf736a4fa5326521df68b4229 (patch)
tree32dff4ec0275195bc51af344a27114f186a84003
parentcffe58dc13136ffda8602962110dee084c522dd8 (diff)
Implement optimistic concurrency support in bulk operations
Bulk update and SQL Server ROWVERSION not yet supported.
-rw-r--r--odb/mssql/simple-object-statements.hxx1
-rw-r--r--odb/mssql/simple-object-statements.txx6
2 files changed, 6 insertions, 1 deletions
diff --git a/odb/mssql/simple-object-statements.hxx b/odb/mssql/simple-object-statements.hxx
index 77b1c34..c62684c 100644
--- a/odb/mssql/simple-object-statements.hxx
+++ b/odb/mssql/simple-object-statements.hxx
@@ -428,6 +428,7 @@ namespace odb
new (details::shared) delete_statement_type (
conn_,
object_traits::optimistic_erase_statement,
+ true, // Unique (0 or 1 affected rows).
od_.id_image_binding_,
false));
}
diff --git a/odb/mssql/simple-object-statements.txx b/odb/mssql/simple-object-statements.txx
index 6e3cf42..9dfe490 100644
--- a/odb/mssql/simple-object-statements.txx
+++ b/odb/mssql/simple-object-statements.txx
@@ -54,7 +54,11 @@ namespace odb
update_image_binding_ (update_image_bind_,
update_column_count + id_column_count +
managed_optimistic_column_count,
- object_traits::batch,
+ // No support for bulk update and ROWVERSION.
+ //
+ (object_traits::rowversion
+ ? 1
+ : object_traits::batch),
sizeof (images),
status_),
id_image_binding_ (update_image_bind_ + update_column_count,