9 #ifndef SOCI_POSTGRESQL_H_INCLUDED 10 #define SOCI_POSTGRESQL_H_INCLUDED 14 # ifdef SOCI_POSTGRESQL_SOURCE 15 # define SOCI_POSTGRESQL_DECL __declspec(dllexport) 17 # define SOCI_POSTGRESQL_DECL __declspec(dllimport) 18 # endif // SOCI_POSTGRESQL_SOURCE 23 #ifndef SOCI_POSTGRESQL_DECL 24 # define SOCI_POSTGRESQL_DECL 32 #pragma warning(disable:4512 4511) 66 void reset(PGresult* result = NULL)
79 void check_for_errors(
char const* errMsg)
const;
85 bool check_for_data(
char const* errMsg)
const;
92 operator const PGresult*()
const {
return result_; }
130 virtual void define_by_pos(
int & position,
133 virtual void pre_fetch();
134 virtual void post_fetch(
bool gotData,
bool calledFromFetch,
137 virtual void clean_up();
151 virtual void define_by_pos(
int & position,
154 virtual void pre_fetch();
155 virtual void post_fetch(
bool gotData,
indicator * ind);
157 virtual void resize(std::size_t sz);
158 virtual std::size_t size();
160 virtual void clean_up();
172 : statement_(st), position_(0), buf_(NULL) {}
174 virtual void bind_by_pos(
int & position,
176 virtual void bind_by_name(std::string
const & name,
179 virtual void pre_use(
indicator const * ind);
180 virtual void post_use(
bool gotData,
indicator * ind);
182 virtual void clean_up();
196 : statement_(st), position_(0) {}
198 virtual void bind_by_pos(
int & position,
200 virtual void bind_by_name(std::string
const & name,
203 virtual void pre_use(
indicator const * ind);
205 virtual std::size_t size();
207 virtual void clean_up();
224 virtual void alloc();
225 virtual void clean_up();
226 virtual void prepare(std::string
const & query,
232 virtual long long get_affected_rows();
233 virtual int get_number_of_rows();
235 virtual std::string rewrite_for_procedure_call(std::string
const & query);
237 virtual int prepare_for_describe();
238 virtual void describe_column(
int colNum,
data_type & dtype,
239 std::string & columnName);
293 virtual std::size_t get_len();
294 virtual std::size_t read(std::size_t offset,
char * buf,
296 virtual std::size_t write(std::size_t offset,
char const * buf,
297 std::size_t toWrite);
298 virtual std::size_t append(
char const * buf, std::size_t toWrite);
299 virtual void trim(std::size_t newLen);
313 virtual void begin();
314 virtual void commit();
315 virtual void rollback();
317 void deallocate_prepared_statement(
const std::string & statementName);
319 virtual bool get_next_sequence_value(
session & s,
320 std::string
const & sequence,
long & value);
330 std::string get_next_statement_name();
357 #endif // SOCI_POSTGRESQL_H_INCLUDED details::statement_type stType_
postgresql_backend_factory()
void init(PGresult *result)
PGresult * get_result() const
postgresql_result(PGresult *result=NULL)
#define SOCI_POSTGRESQL_DECL
postgresql_vector_into_type_backend(postgresql_statement_backend &st)
bool hasVectorIntoElements_
postgresql_vector_use_type_backend(postgresql_statement_backend &st)
long long rowsAffectedBulk_
std::map< int, char ** > UseByPosBuffersMap
bool hasVectorUseElements_
details::exchange_type type_
details::postgresql_result result_
postgresql_session_backend & session_
postgresql_statement_backend & statement_
details::exchange_type type_
SOCI_POSTGRESQL_DECL void register_factory_postgresql()
postgresql_standard_use_type_backend(postgresql_statement_backend &st)
std::vector< std::string > names_
SOCI_POSTGRESQL_DECL backend_factory const * factory_postgresql()
std::map< std::string, char ** > UseByNameBuffersMap
postgresql_session_backend & session_
postgresql_statement_backend & statement_
std::string sqlstate() const
std::string statementName_
std::vector< char * > buffers_
virtual std::string get_backend_name() const
void reset(PGresult *result=NULL)
postgresql_statement_backend & statement_
postgresql_soci_error(std::string const &msg, char const *sqlst)
UseByPosBuffersMap useByPosBuffers_
UseByNameBuffersMap useByNameBuffers_
details::exchange_type type_
details::exchange_type type_
postgresql_statement_backend & statement_
std::vector< ISM::CombinatorialTrainerParameters > parameters
postgresql_standard_into_type_backend(postgresql_statement_backend &st)
SOCI_POSTGRESQL_DECL postgresql_backend_factory const postgresql