diff options
Diffstat (limited to 'odb/sqlite/polymorphic-object-result.hxx')
-rw-r--r-- | odb/sqlite/polymorphic-object-result.hxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/odb/sqlite/polymorphic-object-result.hxx b/odb/sqlite/polymorphic-object-result.hxx index 0b03456..a56eb5b 100644 --- a/odb/sqlite/polymorphic-object-result.hxx +++ b/odb/sqlite/polymorphic-object-result.hxx @@ -14,8 +14,7 @@ #include <odb/details/shared-ptr.hxx> #include <odb/sqlite/version.hxx> -#include <odb/sqlite/forward.hxx> // query_base -#include <odb/sqlite/result.hxx> +#include <odb/sqlite/forward.hxx> // query_base, query_params #include <odb/sqlite/statement.hxx> namespace odb @@ -24,8 +23,7 @@ namespace odb { template <typename T> class polymorphic_object_result_impl: - public odb::polymorphic_object_result_impl<T>, - public result_impl_base + public odb::polymorphic_object_result_impl<T> { public: typedef odb::polymorphic_object_result_impl<T> base_type; @@ -80,6 +78,11 @@ namespace odb load_image (); private: + // We need to hold on to the query parameters because SQLite uses + // the parameter buffers to find each next row. + // + details::shared_ptr<query_params> params_; + details::shared_ptr<select_statement> statement_; statements_type& statements_; }; } |