Common ODB Runtime Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
forward.hxx
Go to the documentation of this file.
1 // file : odb/forward.hxx
2 // copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC
3 // license : GNU GPL v2; see accompanying LICENSE file
4 
5 #ifndef ODB_FORWARD_HXX
6 #define ODB_FORWARD_HXX
7 
8 #include <odb/pre.hxx>
9 
10 #include <cstddef> // std::size_t
11 
12 #include <odb/details/export.hxx>
13 #include <odb/details/shared-ptr-fwd.hxx>
14 
15 namespace odb
16 {
17  // Common and core namespaces. The idea is that you can use the
18  // using directive to get database-independent (common) names or
19  // all core names (core).
20  //
21  namespace common {}
22 
23  namespace core
24  {
25  using namespace common;
26  }
27 
28  //
29  //
30  typedef unsigned long long schema_version;
32 
33  class database;
34  class connection;
35  typedef details::shared_ptr<connection> connection_ptr;
36  class transaction;
37  class statement;
38  class session;
39  class section;
40 
41  namespace common
42  {
43  using odb::schema_version;
45  using odb::session;
46  using odb::section;
47  }
48 
49  namespace core
50  {
51  using odb::database;
52  using odb::connection;
53  using odb::connection_ptr;
54  using odb::transaction;
55  using odb::statement;
56  }
57 
58  // Tracing.
59  //
60  class tracer; // Not in core.
61  extern LIBODB_EXPORT tracer& stderr_tracer;
62 
63  namespace common
64  {
65  using odb::stderr_tracer;
66  }
67 
68  // Implementation details.
69  //
70 
71  // Keep real databases first since their enumerators are used as array
72  // indexes.
73  //
75  {
82  };
83 
84  // Number of real databases (i.e., excluding default) in the database_id
85  // enum.
86  //
87  const std::size_t database_count = id_common;
88 
89  // Traits.
90  //
91  class access
92  {
93  public:
94  template <typename T>
96 
97  template <typename T, database_id DB>
99 
100  template <typename T, typename P>
102 
103  template <typename T>
104  class view_traits;
105 
106  template <typename T, database_id DB>
108 
109  template <typename T, typename P>
111 
112  template <typename T, typename P>
114 
115  template <typename T, database_id DB>
117 
118  template <typename C>
120  };
121 
122  template <typename T>
124 
125  template <typename T, database_id DB>
127 
128  template <typename T>
129  struct view_traits;
130 
131  template <typename T, database_id DB>
133 
134  // Cache traits.
135  //
136  template <typename T> struct no_id_pointer_cache_traits;
137  template <typename T> struct no_op_pointer_cache_traits;
138  template <typename T, typename S> struct pointer_cache_traits;
139  template <typename T> struct no_id_reference_cache_traits;
140  template <typename T> struct no_op_reference_cache_traits;
141  template <typename T, typename S> struct reference_cache_traits;
142 
143  //
144  //
145  class query_base;
146 
147  template <typename T>
148  struct query_column;
149 
150  //
151  //
152  class result_impl;
153  class prepared_query_impl;
154 
155  // Polymorphism support.
156  //
157  template <typename R>
159 
160  namespace details
161  {
162  template <>
163  struct counter_type<connection>
164  {
165  typedef shared_base counter;
166  };
167  }
168 }
169 
170 #include <odb/post.hxx>
171 
172 #endif // ODB_FORWARD_HXX
Definition: statement.hxx:20
Definition: forward.hxx:158
Definition: forward.hxx:136
Definition: prepared-query.hxx:20
Definition: forward.hxx:148
Definition: transaction.hxx:22
details::shared_ptr< connection > connection_ptr
Definition: connection.hxx:30
Definition: cache-traits.hxx:125
Definition: forward.hxx:140
Definition: forward.hxx:139
const std::size_t database_count
Definition: forward.hxx:87
Definition: forward.hxx:119
Definition: forward.hxx:77
Definition: forward.hxx:78
Definition: forward.hxx:80
Definition: forward.hxx:123
Definition: forward.hxx:101
Definition: query-dynamic.hxx:97
Definition: forward.hxx:132
shared_base counter
Definition: forward.hxx:165
Definition: result.hxx:20
Definition: forward.hxx:126
Definition: forward.hxx:81
Definition: forward.hxx:107
unsigned long long schema_version
Definition: forward.hxx:30
Definition: forward.hxx:104
Definition: session.hxx:23
Definition: forward.hxx:116
Definition: forward.hxx:91
Definition: forward.hxx:76
Definition: database.hxx:38
Definition: connection.hxx:33
Definition: forward.hxx:129
database_id
Definition: forward.hxx:74
Definition: forward.hxx:98
Definition: schema-version.hxx:15
Definition: section.hxx:15
Definition: forward.hxx:113
Definition: forward.hxx:137
LIBODB_EXPORT tracer & stderr_tracer
Definition: forward.hxx:79
Definition: forward.hxx:110
Definition: cache-traits.hxx:176
Definition: forward.hxx:95