aboutsummaryrefslogtreecommitdiff
path: root/odb/mysql/result.hxx
blob: 812cb685e46c347a343c94fd3c0a2887e072e7b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// file      : odb/mysql/result.hxx
// author    : Boris Kolpackov <boris@codesynthesis.com>
// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
// license   : GNU GPL v2; see accompanying LICENSE file

#ifndef ODB_MYSQL_RESULT_HXX
#define ODB_MYSQL_RESULT_HXX

#include <odb/pre.hxx>

#include <odb/result.hxx>

#include <odb/mysql/version.hxx>
#include <odb/mysql/forward.hxx>
#include <odb/mysql/statement.hxx>

#include <odb/details/shared-ptr.hxx>

namespace odb
{
  namespace mysql
  {
    template <typename T>
    class result_impl: public odb::result_impl<T>
    {
    public:
      typedef object_traits<T> traits;
      typedef typename traits::pointer_type pointer_type;
      typedef typename traits::pointer_traits pointer_traits;

      virtual
      ~result_impl ();

      result_impl (details::shared_ptr<query_statement> statement,
                   object_statements<T>& statements);

      virtual void
      current ();

      virtual void
      current (T&);

      void
      next ();

      using odb::result_impl<T>::current;

    private:
      details::shared_ptr<query_statement> statement_;
      object_statements<T>& statements_;
    };
  }
}

#include <odb/mysql/result.txx>

#include <odb/post.hxx>

#endif // ODB_MYSQL_RESULT_HXX