From 92349548ad2c2381d66ea2fc501b5466fed9789c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 25 Mar 2011 16:52:35 +0200 Subject: Use forward-declared query class in result interface --- odb/sqlite/forward.hxx | 15 +++++++++++++-- odb/sqlite/query.hxx | 3 ++- odb/sqlite/result.cxx | 1 + odb/sqlite/result.hxx | 3 +-- 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 +#include + namespace odb { namespace sqlite { - // @@ Any garbage here? - // class database; class connection; class connection_factory; @@ -29,6 +29,17 @@ namespace odb template class container_statements; + + class query_params; + } + + namespace details + { + template <> + struct counter_type + { + 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 +#include 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 #include -#include -#include +#include // query, query_params #include #include -- cgit v1.1