aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-03-25 16:52:35 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-03-25 16:52:35 +0200
commit92349548ad2c2381d66ea2fc501b5466fed9789c (patch)
tree86c8666797847674d881f634a4b82cfd55de8dd8
parentacee0bb337fe1895a4d06166effccfbade095a1c (diff)
Use forward-declared query class in result interface
-rw-r--r--odb/sqlite/forward.hxx15
-rw-r--r--odb/sqlite/query.hxx3
-rw-r--r--odb/sqlite/result.cxx1
-rw-r--r--odb/sqlite/result.hxx3
4 files changed, 17 insertions, 5 deletions
diff --git a/odb/sqlite/forward.hxx b/odb/sqlite/forward.hxx
index d141534..7688b9c 100644
--- a/odb/sqlite/forward.hxx
+++ b/odb/sqlite/forward.hxx
@@ -8,12 +8,12 @@
#include <odb/pre.hxx>
+#include <odb/forward.hxx>
+
namespace odb
{
namespace sqlite
{
- // @@ Any garbage here?
- //
class database;
class connection;
class connection_factory;
@@ -29,6 +29,17 @@ namespace odb
template <typename T>
class container_statements;
+
+ class query_params;
+ }
+
+ namespace details
+ {
+ template <>
+ struct counter_type<sqlite::query_params>
+ {
+ typedef shared_base counter;
+ };
}
}
diff --git a/odb/sqlite/query.hxx b/odb/sqlite/query.hxx
index f694b2e..edf9222 100644
--- a/odb/sqlite/query.hxx
+++ b/odb/sqlite/query.hxx
@@ -76,8 +76,9 @@ namespace odb
class query;
- struct LIBODB_SQLITE_EXPORT query_params: details::shared_base
+ class LIBODB_SQLITE_EXPORT query_params: public details::shared_base
{
+ public:
typedef sqlite::binding binding_type;
binding_type&
diff --git a/odb/sqlite/result.cxx b/odb/sqlite/result.cxx
index 7e4116f..29afb3b 100644
--- a/odb/sqlite/result.cxx
+++ b/odb/sqlite/result.cxx
@@ -4,6 +4,7 @@
// license : GNU GPL v2; see accompanying LICENSE file
#include <odb/sqlite/result.hxx>
+#include <odb/sqlite/query.hxx>
namespace odb
{
diff --git a/odb/sqlite/result.hxx b/odb/sqlite/result.hxx
index 187589e..c49ddf1 100644
--- a/odb/sqlite/result.hxx
+++ b/odb/sqlite/result.hxx
@@ -13,8 +13,7 @@
#include <odb/result.hxx>
#include <odb/sqlite/version.hxx>
-#include <odb/sqlite/forward.hxx>
-#include <odb/sqlite/query.hxx>
+#include <odb/sqlite/forward.hxx> // query, query_params
#include <odb/sqlite/statement.hxx>
#include <odb/details/shared-ptr.hxx>