diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2014-11-19 13:54:39 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2014-11-19 13:54:39 +0200 |
commit | 164e70a313ffd245d2760c838a5a30475b7b75ff (patch) | |
tree | a3f54abbea691e4a7f7d5f73af70576dd7613d28 /odb/relational/header.cxx | |
parent | d59e3c27450747e5a04585ee9e943376b5bcfa41 (diff) |
Allow empty runtime and execute views
Use them to handle INSERT/UPDATE SQL Server stored procedures.
Diffstat (limited to 'odb/relational/header.cxx')
-rw-r--r-- | odb/relational/header.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/odb/relational/header.cxx b/odb/relational/header.cxx index 476aad3..392d5f1 100644 --- a/odb/relational/header.cxx +++ b/odb/relational/header.cxx @@ -749,6 +749,7 @@ traverse_view (type& c) bool versioned (context::versioned (c)); string const& type (class_fq_name (c)); + size_t columns (column_count (c).total); size_t obj_count (c.get<size_t> ("object-count")); os << "// " << class_name (c) << endl @@ -826,8 +827,7 @@ traverse_view (type& c) os << "," << endl << "const schema_version_migration&"; - os << ");" - << endl; + os << ")" << (columns != 0 ? ";\n" : "{}"); } // bind (image_type) @@ -840,8 +840,7 @@ traverse_view (type& c) os << "," << endl << "const schema_version_migration&"; - os << ");" - << endl; + os << ")" << (columns != 0 ? ";\n" : "{}"); // init (view, image) // @@ -854,13 +853,11 @@ traverse_view (type& c) os << "," << endl << "const schema_version_migration&"; - os << ");" - << endl; + os << ")" << (columns != 0 ? ";\n" : "{}"); // column_count // - os << "static const std::size_t column_count = " << - column_count (c).total << "UL;" + os << "static const std::size_t column_count = " << columns << "UL;" << endl; // Statements. |