From 70a28c298dfe7f047c1390d097c18d5bb0618d07 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 22 Aug 2011 11:47:55 +0200 Subject: 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). --- common/erase-query/test.hxx | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 common/erase-query/test.hxx (limited to 'common/erase-query/test.hxx') diff --git a/common/erase-query/test.hxx b/common/erase-query/test.hxx new file mode 100644 index 0000000..be5539f --- /dev/null +++ b/common/erase-query/test.hxx @@ -0,0 +1,31 @@ +// file : common/erase-query/test.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef TEST_HXX +#define TEST_HXX + +#include + +#include + +#pragma db object +struct object +{ + object (unsigned long id) + : id_ (id) + { + } + + object () + { + } + + #pragma db id + unsigned long id_; + + std::vector v; +}; + +#endif // TEST_HXX -- cgit v1.1