Oracle ODB Runtime Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
simple-object-result.hxx
Go to the documentation of this file.
1 // file : odb/oracle/simple-object-result.hxx
2 // copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC
3 // license : ODB NCUEL; see accompanying LICENSE file
4 
5 #ifndef ODB_ORACLE_SIMPLE_OBJECT_RESULT_HXX
6 #define ODB_ORACLE_SIMPLE_OBJECT_RESULT_HXX
7 
8 #include <odb/pre.hxx>
9 
10 #include <cstddef> // std::size_t
11 
12 #include <odb/schema-version.hxx>
14 
15 #include <odb/details/shared-ptr.hxx>
16 
17 #include <odb/oracle/version.hxx>
18 #include <odb/oracle/forward.hxx> // query_base
19 #include <odb/oracle/statement.hxx>
21 
22 namespace odb
23 {
24  namespace oracle
25  {
26  template <typename T>
28  {
29  public:
31 
32  typedef typename base_type::id_type id_type;
35 
38 
39  typedef typename object_traits::statements_type statements_type;
40 
41  virtual
43 
45  details::shared_ptr<select_statement>,
48 
49  virtual void
50  load (object_type&, bool fetch);
51 
52  virtual id_type
53  load_id ();
54 
55  virtual void
56  next ();
57 
58  virtual void
59  cache ();
60 
61  virtual std::size_t
62  size ();
63 
64  virtual void
65  invalidate ();
66 
67  using base_type::current;
68 
69  private:
71 
72  static void
73  change_callback (void* context, binding*);
74 
75  private:
76  details::shared_ptr<select_statement> statement_;
77  statements_type& statements_;
79  bool use_copy_;
80  typename object_traits::image_type* image_copy_;
81  };
82  }
83 }
84 
85 #include <odb/oracle/simple-object-result.txx>
86 
87 #include <odb/post.hxx>
88 
89 #endif // ODB_ORACLE_SIMPLE_OBJECT_RESULT_HXX
object_traits::id_type id_type
Definition: query.hxx:165
base_type::pointer_traits pointer_traits
Definition: simple-object-result.hxx:37
Definition: simple-object-result.hxx:27
object_traits_impl< object_type, id_oracle > object_traits
Definition: simple-object-result.hxx:36
object_traits::statements_type statements_type
Definition: simple-object-result.hxx:39
Definition: binding.hxx:21
odb::object_result_impl< T > base_type
Definition: simple-object-result.hxx:30
object_traits::pointer_type pointer_type
base_type::object_type object_type
Definition: simple-object-result.hxx:33
object_result_impl(const query_base &, details::shared_ptr< select_statement >, statements_type &, const schema_version_migration *)
virtual std::size_t size()
virtual void load(object_type &, bool fetch)
base_type::pointer_type pointer_type
Definition: simple-object-result.hxx:34
Definition: oracle-types.hxx:131
base_type::id_type id_type
Definition: simple-object-result.hxx:32