From e5d0186db99492a139237067bab841a5b83463af Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 24 Jan 2024 19:01:19 +0300 Subject: Turn libodb-sqlite repository into package for muti-package repository --- libodb-sqlite/odb/sqlite/no-id-object-result.hxx | 80 ++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 libodb-sqlite/odb/sqlite/no-id-object-result.hxx (limited to 'libodb-sqlite/odb/sqlite/no-id-object-result.hxx') diff --git a/libodb-sqlite/odb/sqlite/no-id-object-result.hxx b/libodb-sqlite/odb/sqlite/no-id-object-result.hxx new file mode 100644 index 0000000..b0edb09 --- /dev/null +++ b/libodb-sqlite/odb/sqlite/no-id-object-result.hxx @@ -0,0 +1,80 @@ +// file : odb/sqlite/no-id-object-result.hxx +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ODB_SQLITE_NO_ID_OBJECT_RESULT_HXX +#define ODB_SQLITE_NO_ID_OBJECT_RESULT_HXX + +#include + +#include // std::size_t + +#include +#include + +#include + +#include +#include // query_base, query_params +#include +#include + +namespace odb +{ + namespace sqlite + { + template + class no_id_object_result_impl: public odb::no_id_object_result_impl + { + public: + typedef odb::no_id_object_result_impl base_type; + + typedef typename base_type::object_type object_type; + typedef typename base_type::pointer_type pointer_type; + + typedef object_traits_impl object_traits; + typedef typename base_type::pointer_traits pointer_traits; + + typedef typename object_traits::statements_type statements_type; + + virtual + ~no_id_object_result_impl (); + + no_id_object_result_impl (const query_base&, + const details::shared_ptr&, + statements_type&, + const schema_version_migration*); + + virtual void + load (object_type&); + + virtual void + next (); + + virtual void + cache (); + + virtual std::size_t + size (); + + virtual void + invalidate (); + + using base_type::current; + + private: + // We need to hold on to the query parameters because SQLite uses + // the parameter buffers to find each next row. + // + details::shared_ptr params_; + details::shared_ptr statement_; + statements_type& statements_; + object_traits_calls tc_; + }; + } +} + +#include + +#include + +#endif // ODB_SQLITE_NO_ID_OBJECT_RESULT_HXX -- cgit v1.1