soci-empty.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004-2006 Maciej Sobczak, Stephen Hutton
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 //
7 
8 #ifndef SOCI_EMPTY_H_INCLUDED
9 #define SOCI_EMPTY_H_INCLUDED
10 
11 #ifdef _WIN32
12 # ifdef SOCI_DLL
13 # ifdef SOCI_EMPTY_SOURCE
14 # define SOCI_EMPTY_DECL __declspec(dllexport)
15 # else
16 # define SOCI_EMPTY_DECL __declspec(dllimport)
17 # endif // SOCI_EMPTY_SOURCE
18 # endif // SOCI_DLL
19 #endif // _WIN32
20 //
21 // If SOCI_EMPTY_DECL isn't defined yet define it now
22 #ifndef SOCI_EMPTY_DECL
23 # define SOCI_EMPTY_DECL
24 #endif
25 
26 #include "soci-backend.h"
27 
28 #include <cstddef>
29 #include <string>
30 
31 namespace soci
32 {
33 
34 struct empty_statement_backend;
35 
37 {
39  : statement_(st)
40  {}
41 
42  void define_by_pos(int& position, void* data, details::exchange_type type);
43 
44  void pre_fetch();
45  void post_fetch(bool gotData, bool calledFromFetch, indicator* ind);
46 
47  void clean_up();
48 
50 };
51 
53 {
55  : statement_(st)
56  {}
57 
58  void define_by_pos(int& position, void* data, details::exchange_type type);
59 
60  void pre_fetch();
61  void post_fetch(bool gotData, indicator* ind);
62 
63  void resize(std::size_t sz);
64  std::size_t size();
65 
66  void clean_up();
67 
69 };
70 
72 {
74  : statement_(st)
75  {}
76 
77  void bind_by_pos(int& position, void* data, details::exchange_type type, bool readOnly);
78  void bind_by_name(std::string const& name, void* data, details::exchange_type type, bool readOnly);
79 
80  void pre_use(indicator const* ind);
81  void post_use(bool gotData, indicator* ind);
82 
83  void clean_up();
84 
86 };
87 
89 {
91  : statement_(st) {}
92 
93  void bind_by_pos(int& position, void* data, details::exchange_type type);
94  void bind_by_name(std::string const& name, void* data, details::exchange_type type);
95 
96  void pre_use(indicator const* ind);
97 
98  std::size_t size();
99 
100  void clean_up();
101 
103 };
104 
105 struct empty_session_backend;
107 {
109 
110  void alloc();
111  void clean_up();
112  void prepare(std::string const& query, details::statement_type eType);
113 
114  exec_fetch_result execute(int number);
115  exec_fetch_result fetch(int number);
116 
117  long long get_affected_rows();
118  int get_number_of_rows();
119 
120  std::string rewrite_for_procedure_call(std::string const& query);
121 
122  int prepare_for_describe();
123  void describe_column(int colNum, data_type& dtype, std::string& columnName);
124 
125  empty_standard_into_type_backend* make_into_type_backend();
126  empty_standard_use_type_backend* make_use_type_backend();
127  empty_vector_into_type_backend* make_vector_into_type_backend();
128  empty_vector_use_type_backend* make_vector_use_type_backend();
129 
131 };
132 
134 {
136 
138 };
139 
141 {
143 
145 
146  std::size_t get_len();
147  std::size_t read(std::size_t offset, char* buf, std::size_t toRead);
148  std::size_t write(std::size_t offset, char const* buf, std::size_t toWrite);
149  std::size_t append(char const* buf, std::size_t toWrite);
150  void trim(std::size_t newLen);
151 
153 };
154 
156 {
158 
160 
161  void begin();
162  void commit();
163  void rollback();
164 
165  std::string get_backend_name() const { return "empty"; }
166 
167  void clean_up();
168 
169  empty_statement_backend* make_statement_backend();
170  empty_rowid_backend* make_rowid_backend();
171  empty_blob_backend* make_blob_backend();
172 };
173 
175 {
177  empty_session_backend* make_session(connection_parameters const& parameters) const;
178 };
179 
181 
182 extern "C"
183 {
184 
185 // for dynamic backend loading
188 
189 } // extern "C"
190 
191 } // namespace soci
192 
193 #endif // SOCI_EMPTY_H_INCLUDED
empty_standard_into_type_backend(empty_statement_backend &st)
Definition: soci-empty.h:38
empty_session_backend & session_
Definition: soci-empty.h:152
empty_vector_use_type_backend(empty_statement_backend &st)
Definition: soci-empty.h:90
SOCI_EMPTY_DECL empty_backend_factory const empty
std::string get_backend_name() const
Definition: soci-empty.h:165
empty_vector_into_type_backend(empty_statement_backend &st)
Definition: soci-empty.h:54
SOCI_EMPTY_DECL void register_factory_empty()
empty_session_backend & session_
Definition: soci-empty.h:130
empty_statement_backend & statement_
Definition: soci-empty.h:68
empty_statement_backend & statement_
Definition: soci-empty.h:85
#define SOCI_EMPTY_DECL
Definition: soci-empty.h:23
empty_standard_use_type_backend(empty_statement_backend &st)
Definition: soci-empty.h:73
empty_statement_backend & statement_
Definition: soci-empty.h:49
empty_statement_backend & statement_
Definition: soci-empty.h:102
std::vector< ISM::CombinatorialTrainerParameters > parameters
SOCI_EMPTY_DECL backend_factory const * factory_empty()


asr_lib_ism
Author(s): Hanselmann Fabian, Heller Florian, Heizmann Heinrich, Kübler Marcel, Mehlhaus Jonas, Meißner Pascal, Qattan Mohamad, Reckling Reno, Stroh Daniel
autogenerated on Wed Jan 8 2020 04:02:41