From 8f59ca1a8d7093655f8f7d61f101abc6df3839d5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 24 Mar 2011 12:35:08 +0200 Subject: Generalization work for MySQL and SQLite support --- odb/relational/context.hxx | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'odb/relational/context.hxx') diff --git a/odb/relational/context.hxx b/odb/relational/context.hxx index c99b400..08f8b81 100644 --- a/odb/relational/context.hxx +++ b/odb/relational/context.hxx @@ -33,6 +33,34 @@ namespace relational string quote_id (string const&) const; + // Quoted column and table names. + // + string + column_qname (semantics::data_member& m) const + { + return quote_id (column_name (m)); + } + + string + column_qname (semantics::data_member& m, + string const& key_prefix, + string const& default_name) const + { + return quote_id (column_name (m, key_prefix, default_name)); + } + + string + table_qname (semantics::class_& c) const + { + return quote_id (table_name (c)); + } + + string + table_qname (semantics::data_member& m, table_prefix const& p) const + { + return quote_id (table_name (m, p)); + } + protected: // The default implementation returns false. // @@ -76,8 +104,15 @@ namespace relational struct data: root_context::data { data (std::ostream& os): root_context::data (os) {} + + string bind_vector_; + string truncated_vector_; }; data* data_; + + public: + string const& bind_vector; + string const& truncated_vector; }; } -- cgit v1.1