From f3f682c074117fda84bf51a4ce9a378d950a04de Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 30 Aug 2013 06:06:26 +0200 Subject: Statement processing/optimization base work --- odb/relational/header.hxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'odb/relational/header.hxx') diff --git a/odb/relational/header.hxx b/odb/relational/header.hxx index 4616543..0620a98 100644 --- a/odb/relational/header.hxx +++ b/odb/relational/header.hxx @@ -242,6 +242,7 @@ namespace relational // Figure out column counts. // size_t id_columns, value_columns, data_columns, cond_columns; + bool versioned; if (!reuse_abst) { @@ -323,6 +324,8 @@ namespace relational data_columns += value_columns; } + versioned = force_versioned; + // Store column counts for the source generator. // m.set ("id-column-count", id_columns); @@ -369,6 +372,9 @@ namespace relational data_columns << "UL;" << endl; + os << "static const bool versioned = " << versioned << ";" + << endl; + // Statements. // os << "static const char insert_statement[];" @@ -986,6 +992,7 @@ namespace relational // column_count // column_count_type const& cc (column_count (poly ? *poly_root : c_)); + bool versioned (force_versioned); // Generate load and update column counts even when they are zero so // that we can instantiate section_statements. @@ -1003,6 +1010,9 @@ namespace relational (update ? s.total - s.inverse - s.readonly : 0) << "UL;" << endl; + os << "static const bool versioned = " << versioned << ";" + << endl; + // Statements. // if (load || load_opt) -- cgit v1.1