diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-10-04 11:33:49 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-10-19 11:40:38 +0200 |
commit | b134d7b4f2c105870a98a67ec568c16c9f632aba (patch) | |
tree | 03843d3ca794926ff050b5d2bb99d9e3ef0a11ab /odb/relational/header.hxx | |
parent | 4eb0df751704345ec8744fe012e64064d5cdb754 (diff) |
Initial support for prepared queries
Diffstat (limited to 'odb/relational/header.hxx')
-rw-r--r-- | odb/relational/header.hxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/odb/relational/header.hxx b/odb/relational/header.hxx index 9d932ae..fe08a49 100644 --- a/odb/relational/header.hxx +++ b/odb/relational/header.hxx @@ -1124,9 +1124,10 @@ namespace relational // query () // - os << "static result<view_type>" << endl - << "query (database&, const query_base_type&);" - << endl; + if (!options.omit_unprepared ()) + os << "static result<view_type>" << endl + << "query (database&, const query_base_type&);" + << endl; view_public_extra_post (c); @@ -1445,8 +1446,12 @@ namespace relational generate () { os << "#include <odb/details/buffer.hxx>" << endl - << "#include <odb/details/unused.hxx>" << endl - << endl; + << "#include <odb/details/unused.hxx>" << endl; + + if (options.generate_query ()) + os << "#include <odb/details/shared-ptr.hxx>" << endl; + + os << endl; os << "#include <odb/" << db << "/version.hxx>" << endl << "#include <odb/" << db << "/forward.hxx>" << endl |