diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-08-22 11:47:55 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-08-22 11:47:55 +0200 |
commit | b79afa6dbea19905b2a035365274616dd1dae2b1 (patch) | |
tree | 428110d79f2dfdeaef4405c5b27cd2fdd1ab969b /odb/relational/header.hxx | |
parent | 3e57c662b42831555498607d607c349f30c5b7de (diff) |
Add database::erase_query() function
New test: common/erase-query. Documentation is in Section 3.9, "Deleting
Persistent Objects". The current implementation does not work well with
the session (no removal of the erased objects from the cache).
Diffstat (limited to 'odb/relational/header.hxx')
-rw-r--r-- | odb/relational/header.hxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/odb/relational/header.hxx b/odb/relational/header.hxx index ceca095..49de640 100644 --- a/odb/relational/header.hxx +++ b/odb/relational/header.hxx @@ -948,7 +948,12 @@ namespace relational << "static const char* const erase_statement;"; if (options.generate_query ()) - os << "static const char* const query_clause;"; + { + os << "static const char* const query_clause;" + << "static const char* const erase_query_clause;" + << endl + << "static const char* const table_name;"; + } os << endl; @@ -999,11 +1004,17 @@ namespace relational // query () // if (options.generate_query ()) + { os << "template<typename T>" << endl << "static result<T>" << endl << "query (database&, const query_type&);" << endl; + os << "static unsigned long long" << endl + << "erase_query (database&, const query_type&);" + << endl; + } + // create_schema () // if (embedded_schema) |