auto-handle.hxx | auto-handle.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/auto-handle.hxx | // file : odb/pgsql/auto-handle.hxx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_AUTO_HANDLE_HXX | #ifndef ODB_PGSQL_AUTO_HANDLE_HXX | |||
#define ODB_PGSQL_AUTO_HANDLE_HXX | #define ODB_PGSQL_AUTO_HANDLE_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <odb/pgsql/version.hxx> | #include <odb/pgsql/version.hxx> | |||
#include <odb/pgsql/pgsql-fwd.hxx> // PGconn, PGresult | #include <odb/pgsql/pgsql-fwd.hxx> // PGconn, PGresult | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
binding.hxx | binding.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/binding.hxx | // file : odb/pgsql/binding.hxx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_BINDING_HXX | #ifndef ODB_PGSQL_BINDING_HXX | |||
#define ODB_PGSQL_BINDING_HXX | #define ODB_PGSQL_BINDING_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <cstddef> // std::size_t | #include <cstddef> // std::size_t | |||
#include <odb/pgsql/version.hxx> | #include <odb/pgsql/version.hxx> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
config.h | config.h | |||
---|---|---|---|---|
/* odb/pgsql/details/config.h. Generated from config.h.in by configure. * / | /* odb/pgsql/details/config.h. Generated from config.h.in by configure. * / | |||
/* file : odb/pgsql/details/config.h.in | /* file : odb/pgsql/details/config.h.in | |||
* copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | * copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
* license : GNU GPL v2; see accompanying LICENSE file | * license : GNU GPL v2; see accompanying LICENSE file | |||
*/ | */ | |||
/* This file is automatically processed by configure. */ | /* This file is automatically processed by configure. */ | |||
#ifndef ODB_PGSQL_DETAILS_CONFIG_H | #ifndef ODB_PGSQL_DETAILS_CONFIG_H | |||
#define ODB_PGSQL_DETAILS_CONFIG_H | #define ODB_PGSQL_DETAILS_CONFIG_H | |||
/* #undef LIBODB_PGSQL_STATIC_LIB */ | /* #undef LIBODB_PGSQL_STATIC_LIB */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
config.hxx | config.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/details/config.hxx | // file : odb/pgsql/details/config.hxx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_DETAILS_CONFIG_HXX | #ifndef ODB_PGSQL_DETAILS_CONFIG_HXX | |||
#define ODB_PGSQL_DETAILS_CONFIG_HXX | #define ODB_PGSQL_DETAILS_CONFIG_HXX | |||
// no pre | // no pre | |||
#ifdef _MSC_VER | #ifdef _MSC_VER | |||
#elif defined(ODB_COMPILER) | #elif defined(ODB_COMPILER) | |||
# error libodb-pgsql header included in odb-compiled header | # error libodb-pgsql header included in odb-compiled header | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
connection-factory.hxx | connection-factory.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/connection-factory.hxx | // file : odb/pgsql/connection-factory.hxx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_CONNECTION_FACTORY_HXX | #ifndef ODB_PGSQL_CONNECTION_FACTORY_HXX | |||
#define ODB_PGSQL_CONNECTION_FACTORY_HXX | #define ODB_PGSQL_CONNECTION_FACTORY_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <vector> | #include <vector> | |||
#include <cstddef> // std::size_t | #include <cstddef> // std::size_t | |||
#include <cassert> | #include <cassert> | |||
skipping to change at line 111 | skipping to change at line 111 | |||
database (database_type&); | database (database_type&); | |||
virtual | virtual | |||
~connection_pool_factory (); | ~connection_pool_factory (); | |||
private: | private: | |||
connection_pool_factory (const connection_pool_factory&); | connection_pool_factory (const connection_pool_factory&); | |||
connection_pool_factory& operator= (const connection_pool_factory&); | connection_pool_factory& operator= (const connection_pool_factory&); | |||
protected: | protected: | |||
class pooled_connection: public connection | class LIBODB_PGSQL_EXPORT pooled_connection: public connection | |||
{ | { | |||
public: | public: | |||
pooled_connection (database_type&); | pooled_connection (database_type&); | |||
pooled_connection (database_type&, PGconn*); | pooled_connection (database_type&, PGconn*); | |||
private: | private: | |||
static bool | static bool | |||
zero_counter (void*); | zero_counter (void*); | |||
private: | private: | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
connection.hxx | connection.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/connection.hxx | // file : odb/pgsql/connection.hxx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_CONNECTION_HXX | #ifndef ODB_PGSQL_CONNECTION_HXX | |||
#define ODB_PGSQL_CONNECTION_HXX | #define ODB_PGSQL_CONNECTION_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <odb/connection.hxx> | #include <odb/connection.hxx> | |||
#include <odb/details/shared-ptr.hxx> | #include <odb/details/shared-ptr.hxx> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
connection.ixx | connection.ixx | |||
---|---|---|---|---|
// file : odb/pgsql/connection.ixx | // file : odb/pgsql/connection.ixx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
namespace odb | namespace odb | |||
{ | { | |||
namespace pgsql | namespace pgsql | |||
{ | { | |||
template <typename T> | template <typename T> | |||
inline prepared_query<T> connection:: | inline prepared_query<T> connection:: | |||
prepare_query (const char* n, const char* q) | prepare_query (const char* n, const char* q) | |||
{ | { | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
container-statements.hxx | container-statements.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/container-statements.hxx | // file : odb/pgsql/container-statements.hxx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_CONTAINER_STATEMENTS_HXX | #ifndef ODB_PGSQL_CONTAINER_STATEMENTS_HXX | |||
#define ODB_PGSQL_CONTAINER_STATEMENTS_HXX | #define ODB_PGSQL_CONTAINER_STATEMENTS_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <cstddef> // std::size_t | #include <cstddef> // std::size_t | |||
#include <odb/forward.hxx> | #include <odb/forward.hxx> | |||
skipping to change at line 138 | skipping to change at line 138 | |||
insert_.reset ( | insert_.reset ( | |||
new (details::shared) insert_statement_type ( | new (details::shared) insert_statement_type ( | |||
conn_, | conn_, | |||
insert_name_, | insert_name_, | |||
insert_text_, | insert_text_, | |||
versioned_, // Process if versioned. | versioned_, // Process if versioned. | |||
insert_types_, | insert_types_, | |||
insert_count_, | insert_count_, | |||
insert_image_binding_, | insert_image_binding_, | |||
insert_image_native_binding_, | insert_image_native_binding_, | |||
false, | 0, | |||
false)); | false)); | |||
return *insert_; | return *insert_; | |||
} | } | |||
select_statement_type& | select_statement_type& | |||
select_statement () | select_statement () | |||
{ | { | |||
if (select_ == 0) | if (select_ == 0) | |||
select_.reset ( | select_.reset ( | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
container-statements.txx | container-statements.txx | |||
---|---|---|---|---|
// file : odb/pgsql/container-statements.txx | // file : odb/pgsql/container-statements.txx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#include <cstddef> // std::size_t | #include <cstddef> // std::size_t | |||
#include <cstring> // std::memset | #include <cstring> // std::memset | |||
namespace odb | namespace odb | |||
{ | { | |||
namespace pgsql | namespace pgsql | |||
{ | { | |||
// container_statements | // container_statements | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
conversion.hxx | conversion.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/details/conversion.hxx | // file : odb/pgsql/details/conversion.hxx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_DETAILS_CONVERSION_HXX | #ifndef ODB_PGSQL_DETAILS_CONVERSION_HXX | |||
#define ODB_PGSQL_DETAILS_CONVERSION_HXX | #define ODB_PGSQL_DETAILS_CONVERSION_HXX | |||
#include <odb/pgsql/traits.hxx> | #include <odb/pgsql/traits.hxx> | |||
#include <odb/details/meta/answer.hxx> | #include <odb/details/meta/answer.hxx> | |||
namespace odb | namespace odb | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
database.hxx | database.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/database.hxx | // file : odb/pgsql/database.hxx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_DATABASE_HXX | #ifndef ODB_PGSQL_DATABASE_HXX | |||
#define ODB_PGSQL_DATABASE_HXX | #define ODB_PGSQL_DATABASE_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <string> | #include <string> | |||
#include <memory> // std::auto_ptr, std::unique_ptr | #include <memory> // std::auto_ptr, std::unique_ptr | |||
#include <iosfwd> // std::ostream | #include <iosfwd> // std::ostream | |||
skipping to change at line 96 | skipping to change at line 96 | |||
public: | public: | |||
// Make the object persistent. | // Make the object persistent. | |||
// | // | |||
template <typename T> | template <typename T> | |||
typename object_traits<T>::id_type | typename object_traits<T>::id_type | |||
persist (T& object); | persist (T& object); | |||
template <typename T> | template <typename T> | |||
typename object_traits<T>::id_type | typename object_traits<T>::id_type | |||
persist (const T& object); | ||||
template <typename T> | ||||
typename object_traits<T>::id_type | ||||
persist (T* obj_ptr); | persist (T* obj_ptr); | |||
template <typename T, template <typename> class P> | template <typename T, template <typename> class P> | |||
typename object_traits<T>::id_type | typename object_traits<T>::id_type | |||
persist (const P<T>& obj_ptr); | persist (const P<T>& obj_ptr); | |||
template <typename T, typename A1, template <typename, typename> clas s P> | template <typename T, typename A1, template <typename, typename> clas s P> | |||
typename object_traits<T>::id_type | typename object_traits<T>::id_type | |||
persist (const P<T, A1>& obj_ptr); | persist (const P<T, A1>& obj_ptr); | |||
skipping to change at line 291 | skipping to change at line 295 | |||
query (const std::string&); | query (const std::string&); | |||
template <typename T> | template <typename T> | |||
result<T> | result<T> | |||
query (const pgsql::query_base&); | query (const pgsql::query_base&); | |||
template <typename T> | template <typename T> | |||
result<T> | result<T> | |||
query (const odb::query_base&); | query (const odb::query_base&); | |||
// Query one API. | ||||
// | ||||
template <typename T> | ||||
typename object_traits<T>::pointer_type | ||||
query_one (); | ||||
template <typename T> | ||||
bool | ||||
query_one (T& object); | ||||
template <typename T> | ||||
T | ||||
query_value (); | ||||
template <typename T> | ||||
typename object_traits<T>::pointer_type | ||||
query_one (const char*); | ||||
template <typename T> | ||||
bool | ||||
query_one (const char*, T& object); | ||||
template <typename T> | ||||
T | ||||
query_value (const char*); | ||||
template <typename T> | ||||
typename object_traits<T>::pointer_type | ||||
query_one (const std::string&); | ||||
template <typename T> | ||||
bool | ||||
query_one (const std::string&, T& object); | ||||
template <typename T> | ||||
T | ||||
query_value (const std::string&); | ||||
template <typename T> | ||||
typename object_traits<T>::pointer_type | ||||
query_one (const pgsql::query_base&); | ||||
template <typename T> | ||||
bool | ||||
query_one (const pgsql::query_base&, T& object); | ||||
template <typename T> | ||||
T | ||||
query_value (const pgsql::query_base&); | ||||
template <typename T> | ||||
typename object_traits<T>::pointer_type | ||||
query_one (const odb::query_base&); | ||||
template <typename T> | ||||
bool | ||||
query_one (const odb::query_base&, T& object); | ||||
template <typename T> | ||||
T | ||||
query_value (const odb::query_base&); | ||||
// Query preparation. | // Query preparation. | |||
// | // | |||
template <typename T> | template <typename T> | |||
prepared_query<T> | prepared_query<T> | |||
prepare_query (const char* name, const char*); | prepare_query (const char* name, const char*); | |||
template <typename T> | template <typename T> | |||
prepared_query<T> | prepared_query<T> | |||
prepare_query (const char* name, const std::string&); | prepare_query (const char* name, const std::string&); | |||
End of changes. 3 change blocks. | ||||
1 lines changed or deleted | 67 lines changed or added | |||
database.ixx | database.ixx | |||
---|---|---|---|---|
// file : odb/pgsql/database.ixx | // file : odb/pgsql/database.ixx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#include <odb/pgsql/transaction.hxx> | #include <odb/pgsql/transaction.hxx> | |||
namespace odb | namespace odb | |||
{ | { | |||
namespace pgsql | namespace pgsql | |||
{ | { | |||
inline connection_ptr database:: | inline connection_ptr database:: | |||
connection () | connection () | |||
skipping to change at line 30 | skipping to change at line 30 | |||
template <typename T> | template <typename T> | |||
inline typename object_traits<T>::id_type database:: | inline typename object_traits<T>::id_type database:: | |||
persist (T& obj) | persist (T& obj) | |||
{ | { | |||
return persist_<T, id_pgsql> (obj); | return persist_<T, id_pgsql> (obj); | |||
} | } | |||
template <typename T> | template <typename T> | |||
inline typename object_traits<T>::id_type database:: | inline typename object_traits<T>::id_type database:: | |||
persist (const T& obj) | ||||
{ | ||||
return persist_<const T, id_pgsql> (obj); | ||||
} | ||||
template <typename T> | ||||
inline typename object_traits<T>::id_type database:: | ||||
persist (T* p) | persist (T* p) | |||
{ | { | |||
typedef typename object_traits<T>::pointer_type object_pointer; | typedef typename object_traits<T>::pointer_type object_pointer; | |||
// The passed pointer should be the same or implicit-convertible | // The passed pointer should be the same or implicit-convertible | |||
// to the object pointer. This way we make sure the object pointer | // to the object pointer. This way we make sure the object pointer | |||
// does not assume ownership of the passed object. | // does not assume ownership of the passed object. | |||
// | // | |||
const object_pointer& pobj (p); | const object_pointer& pobj (p); | |||
skipping to change at line 432 | skipping to change at line 439 | |||
template <typename T> | template <typename T> | |||
inline result<T> database:: | inline result<T> database:: | |||
query (const odb::query_base& q) | query (const odb::query_base& q) | |||
{ | { | |||
// Translate to native query. | // Translate to native query. | |||
// | // | |||
return query<T> (pgsql::query_base (q)); | return query<T> (pgsql::query_base (q)); | |||
} | } | |||
template <typename T> | template <typename T> | |||
inline typename object_traits<T>::pointer_type database:: | ||||
query_one () | ||||
{ | ||||
return query_one<T> (pgsql::query_base ()); | ||||
} | ||||
template <typename T> | ||||
inline bool database:: | ||||
query_one (T& o) | ||||
{ | ||||
return query_one<T> (pgsql::query_base (), o); | ||||
} | ||||
template <typename T> | ||||
inline T database:: | ||||
query_value () | ||||
{ | ||||
return query_value<T> (pgsql::query_base ()); | ||||
} | ||||
template <typename T> | ||||
inline typename object_traits<T>::pointer_type database:: | ||||
query_one (const char* q) | ||||
{ | ||||
return query_one<T> (pgsql::query_base (q)); | ||||
} | ||||
template <typename T> | ||||
inline bool database:: | ||||
query_one (const char* q, T& o) | ||||
{ | ||||
return query_one<T> (pgsql::query_base (q), o); | ||||
} | ||||
template <typename T> | ||||
inline T database:: | ||||
query_value (const char* q) | ||||
{ | ||||
return query_value<T> (pgsql::query_base (q)); | ||||
} | ||||
template <typename T> | ||||
inline typename object_traits<T>::pointer_type database:: | ||||
query_one (const std::string& q) | ||||
{ | ||||
return query_one<T> (pgsql::query_base (q)); | ||||
} | ||||
template <typename T> | ||||
inline bool database:: | ||||
query_one (const std::string& q, T& o) | ||||
{ | ||||
return query_one<T> (pgsql::query_base (q), o); | ||||
} | ||||
template <typename T> | ||||
inline T database:: | ||||
query_value (const std::string& q) | ||||
{ | ||||
return query_value<T> (pgsql::query_base (q)); | ||||
} | ||||
template <typename T> | ||||
inline typename object_traits<T>::pointer_type database:: | ||||
query_one (const pgsql::query_base& q) | ||||
{ | ||||
// T is always object_type. We also don't need to check for transacti | ||||
on | ||||
// here; object_traits::query () does this. | ||||
// | ||||
return query_one_<T, id_pgsql> (q); | ||||
} | ||||
template <typename T> | ||||
inline bool database:: | ||||
query_one (const pgsql::query_base& q, T& o) | ||||
{ | ||||
// T is always object_type. We also don't need to check for transacti | ||||
on | ||||
// here; object_traits::query () does this. | ||||
// | ||||
return query_one_<T, id_pgsql> (q, o); | ||||
} | ||||
template <typename T> | ||||
inline T database:: | ||||
query_value (const pgsql::query_base& q) | ||||
{ | ||||
// T is always object_type. We also don't need to check for transacti | ||||
on | ||||
// here; object_traits::query () does this. | ||||
// | ||||
return query_value_<T, id_pgsql> (q); | ||||
} | ||||
template <typename T> | ||||
inline typename object_traits<T>::pointer_type database:: | ||||
query_one (const odb::query_base& q) | ||||
{ | ||||
// Translate to native query. | ||||
// | ||||
return query_one<T> (pgsql::query_base (q)); | ||||
} | ||||
template <typename T> | ||||
inline bool database:: | ||||
query_one (const odb::query_base& q, T& o) | ||||
{ | ||||
// Translate to native query. | ||||
// | ||||
return query_one<T> (pgsql::query_base (q), o); | ||||
} | ||||
template <typename T> | ||||
inline T database:: | ||||
query_value (const odb::query_base& q) | ||||
{ | ||||
// Translate to native query. | ||||
// | ||||
return query_value<T> (pgsql::query_base (q)); | ||||
} | ||||
template <typename T> | ||||
inline prepared_query<T> database:: | inline prepared_query<T> database:: | |||
prepare_query (const char* n, const char* q) | prepare_query (const char* n, const char* q) | |||
{ | { | |||
return prepare_query<T> (n, pgsql::query_base (q)); | return prepare_query<T> (n, pgsql::query_base (q)); | |||
} | } | |||
template <typename T> | template <typename T> | |||
inline prepared_query<T> database:: | inline prepared_query<T> database:: | |||
prepare_query (const char* n, const std::string& q) | prepare_query (const char* n, const std::string& q) | |||
{ | { | |||
End of changes. 3 change blocks. | ||||
1 lines changed or deleted | 131 lines changed or added | |||
endian-traits.hxx | endian-traits.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/details/endian-traits.hxx | // file : odb/pgsql/details/endian-traits.hxx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_DETAILS_ENDIAN_TRAITS_HXX | #ifndef ODB_PGSQL_DETAILS_ENDIAN_TRAITS_HXX | |||
#define ODB_PGSQL_DETAILS_ENDIAN_TRAITS_HXX | #define ODB_PGSQL_DETAILS_ENDIAN_TRAITS_HXX | |||
#include <cstddef> // std::size_t | #include <cstddef> // std::size_t | |||
#include <algorithm> // std::reverse | #include <algorithm> // std::reverse | |||
#include <odb/pgsql/details/export.hxx> | #include <odb/pgsql/details/export.hxx> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
error.hxx | error.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/error.hxx | // file : odb/pgsql/error.hxx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_ERROR_HXX | #ifndef ODB_PGSQL_ERROR_HXX | |||
#define ODB_PGSQL_ERROR_HXX | #define ODB_PGSQL_ERROR_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <libpq-fe.h> | #include <libpq-fe.h> | |||
#include <odb/pgsql/version.hxx> | #include <odb/pgsql/version.hxx> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
error.ixx | error.ixx | |||
---|---|---|---|---|
// file : odb/pgsql/error.ixx | // file : odb/pgsql/error.ixx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
namespace odb | namespace odb | |||
{ | { | |||
namespace pgsql | namespace pgsql | |||
{ | { | |||
bool | bool | |||
inline is_good_result (PGresult* r, ExecStatusType* s) | inline is_good_result (PGresult* r, ExecStatusType* s) | |||
{ | { | |||
if (r != 0) | if (r != 0) | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
exceptions.hxx | exceptions.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/exceptions.hxx | // file : odb/pgsql/exceptions.hxx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_EXCEPTIONS_HXX | #ifndef ODB_PGSQL_EXCEPTIONS_HXX | |||
#define ODB_PGSQL_EXCEPTIONS_HXX | #define ODB_PGSQL_EXCEPTIONS_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <string> | #include <string> | |||
#include <odb/exceptions.hxx> | #include <odb/exceptions.hxx> | |||
skipping to change at line 46 | skipping to change at line 46 | |||
const std::string& | const std::string& | |||
sqlstate () const | sqlstate () const | |||
{ | { | |||
return sqlstate_; | return sqlstate_; | |||
} | } | |||
virtual const char* | virtual const char* | |||
what () const throw (); | what () const throw (); | |||
virtual database_exception* | ||||
clone () const; | ||||
private: | private: | |||
std::string sqlstate_; | std::string sqlstate_; | |||
std::string message_; | std::string message_; | |||
std::string what_; | std::string what_; | |||
}; | }; | |||
struct LIBODB_PGSQL_EXPORT cli_exception: odb::exception | struct LIBODB_PGSQL_EXPORT cli_exception: odb::exception | |||
{ | { | |||
cli_exception (const std::string& what); | cli_exception (const std::string& what); | |||
~cli_exception () throw (); | ~cli_exception () throw (); | |||
virtual const char* | virtual const char* | |||
what () const throw (); | what () const throw (); | |||
virtual cli_exception* | ||||
clone () const; | ||||
private: | private: | |||
std::string what_; | std::string what_; | |||
}; | }; | |||
namespace core | namespace core | |||
{ | { | |||
using pgsql::database_exception; | using pgsql::database_exception; | |||
using pgsql::cli_exception; | using pgsql::cli_exception; | |||
} | } | |||
} | } | |||
End of changes. 3 change blocks. | ||||
1 lines changed or deleted | 7 lines changed or added | |||
export.hxx | export.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/details/export.hxx | // file : odb/pgsql/details/export.hxx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_DETAILS_EXPORT_HXX | #ifndef ODB_PGSQL_DETAILS_EXPORT_HXX | |||
#define ODB_PGSQL_DETAILS_EXPORT_HXX | #define ODB_PGSQL_DETAILS_EXPORT_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <odb/pgsql/details/config.hxx> | #include <odb/pgsql/details/config.hxx> | |||
#ifdef LIBODB_PGSQL_STATIC_LIB | #ifdef LIBODB_PGSQL_STATIC_LIB | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
forward.hxx | forward.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/forward.hxx | // file : odb/pgsql/forward.hxx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_FORWARD_HXX | #ifndef ODB_PGSQL_FORWARD_HXX | |||
#define ODB_PGSQL_FORWARD_HXX | #define ODB_PGSQL_FORWARD_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <odb/forward.hxx> | #include <odb/forward.hxx> | |||
namespace odb | namespace odb | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
no-id-object-result.hxx | no-id-object-result.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/no-id-object-result.hxx | // file : odb/pgsql/no-id-object-result.hxx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_NO_ID_OBJECT_RESULT_HXX | #ifndef ODB_PGSQL_NO_ID_OBJECT_RESULT_HXX | |||
#define ODB_PGSQL_NO_ID_OBJECT_RESULT_HXX | #define ODB_PGSQL_NO_ID_OBJECT_RESULT_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <cstddef> // std::size_t | #include <cstddef> // std::size_t | |||
#include <odb/schema-version.hxx> | #include <odb/schema-version.hxx> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
no-id-object-result.txx | no-id-object-result.txx | |||
---|---|---|---|---|
// file : odb/pgsql/no-id-object-result.txx | // file : odb/pgsql/no-id-object-result.txx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#include <odb/callback.hxx> | #include <odb/callback.hxx> | |||
#include <odb/pgsql/no-id-object-statements.hxx> | #include <odb/pgsql/no-id-object-statements.hxx> | |||
namespace odb | namespace odb | |||
{ | { | |||
namespace pgsql | namespace pgsql | |||
{ | { | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
no-id-object-statements.hxx | no-id-object-statements.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/no-id-object-statements.hxx | // file : odb/pgsql/no-id-object-statements.hxx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_NO_ID_OBJECT_STATEMENTS_HXX | #ifndef ODB_PGSQL_NO_ID_OBJECT_STATEMENTS_HXX | |||
#define ODB_PGSQL_NO_ID_OBJECT_STATEMENTS_HXX | #define ODB_PGSQL_NO_ID_OBJECT_STATEMENTS_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <cstddef> // std::size_t | #include <cstddef> // std::size_t | |||
#include <odb/forward.hxx> | #include <odb/forward.hxx> | |||
skipping to change at line 95 | skipping to change at line 95 | |||
persist_.reset ( | persist_.reset ( | |||
new (details::shared) insert_statement_type ( | new (details::shared) insert_statement_type ( | |||
conn_, | conn_, | |||
object_traits::persist_statement_name, | object_traits::persist_statement_name, | |||
object_traits::persist_statement, | object_traits::persist_statement, | |||
object_traits::versioned, // Process if versioned. | object_traits::versioned, // Process if versioned. | |||
object_traits::persist_statement_types, | object_traits::persist_statement_types, | |||
insert_column_count, | insert_column_count, | |||
insert_image_binding_, | insert_image_binding_, | |||
insert_image_native_binding_, | insert_image_native_binding_, | |||
false, | 0, | |||
false)); | false)); | |||
return *persist_; | return *persist_; | |||
} | } | |||
public: | public: | |||
// select = total | // select = total | |||
// insert = total - inverse; inverse == 0 for object without id | // insert = total - inverse; inverse == 0 for object without id | |||
// | // | |||
static const std::size_t insert_column_count = | static const std::size_t insert_column_count = | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
no-id-object-statements.txx | no-id-object-statements.txx | |||
---|---|---|---|---|
// file : odb/pgsql/no-id-object-statements.txx | // file : odb/pgsql/no-id-object-statements.txx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#include <cstring> // std::memset | #include <cstring> // std::memset | |||
namespace odb | namespace odb | |||
{ | { | |||
namespace pgsql | namespace pgsql | |||
{ | { | |||
// | // | |||
// no_id_object_statements | // no_id_object_statements | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
pgsql-fwd.hxx | pgsql-fwd.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/pgsql-fwd.hxx | // file : odb/pgsql/pgsql-fwd.hxx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_PGSQL_FWD_HXX | #ifndef ODB_PGSQL_PGSQL_FWD_HXX | |||
#define ODB_PGSQL_PGSQL_FWD_HXX | #define ODB_PGSQL_PGSQL_FWD_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
// Forward declaration for some of the types defined in libpq-fe.h. This | // Forward declaration for some of the types defined in libpq-fe.h. This | |||
// allows us to avoid having to include libpq-fe.h in public headers. | // allows us to avoid having to include libpq-fe.h in public headers. | |||
// | // | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
pgsql-oid.hxx | pgsql-oid.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/pgsql-oid.hxx | // file : odb/pgsql/pgsql-oid.hxx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
// Generated file of OIDs extracted from the PostgreSQL 8.4.8 source file | // Generated file of OIDs extracted from the PostgreSQL 8.4.8 source file | |||
// src/include/catalog/pg_type.h | // src/include/catalog/pg_type.h | |||
// | // | |||
#ifndef ODB_PGSQL_PGSQL_OID_HXX | #ifndef ODB_PGSQL_PGSQL_OID_HXX | |||
#define ODB_PGSQL_PGSQL_OID_HXX | #define ODB_PGSQL_PGSQL_OID_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
pgsql-types.hxx | pgsql-types.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/pgsql-types.hxx | // file : odb/pgsql/pgsql-types.hxx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_PGSQL_TYPES_HXX | #ifndef ODB_PGSQL_PGSQL_TYPES_HXX | |||
#define ODB_PGSQL_PGSQL_TYPES_HXX | #define ODB_PGSQL_PGSQL_TYPES_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <cstddef> // std::size_t | #include <cstddef> // std::size_t | |||
#include <odb/pgsql/pgsql-fwd.hxx> // Oid | #include <odb/pgsql/pgsql-fwd.hxx> // Oid | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
polymorphic-object-result.hxx | polymorphic-object-result.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/polymorphic-object-result.hxx | // file : odb/pgsql/polymorphic-object-result.hxx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_POLYMORPHIC_OBJECT_RESULT_HXX | #ifndef ODB_PGSQL_POLYMORPHIC_OBJECT_RESULT_HXX | |||
#define ODB_PGSQL_POLYMORPHIC_OBJECT_RESULT_HXX | #define ODB_PGSQL_POLYMORPHIC_OBJECT_RESULT_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <cstddef> // std::size_t | #include <cstddef> // std::size_t | |||
#include <odb/schema-version.hxx> | #include <odb/schema-version.hxx> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
polymorphic-object-result.txx | polymorphic-object-result.txx | |||
---|---|---|---|---|
// file : odb/pgsql/polymorphic-object-result.txx | // file : odb/pgsql/polymorphic-object-result.txx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#include <cassert> | #include <cassert> | |||
#include <odb/callback.hxx> | #include <odb/callback.hxx> | |||
#include <odb/exceptions.hxx> // object_not_persistent | #include <odb/exceptions.hxx> // object_not_persistent | |||
#include <odb/pgsql/polymorphic-object-statements.hxx> | #include <odb/pgsql/polymorphic-object-statements.hxx> | |||
namespace odb | namespace odb | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
polymorphic-object-statements.hxx | polymorphic-object-statements.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/polymorphic-object-statements.hxx | // file : odb/pgsql/polymorphic-object-statements.hxx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_POLYMORPHIC_OBJECT_STATEMENTS_HXX | #ifndef ODB_PGSQL_POLYMORPHIC_OBJECT_STATEMENTS_HXX | |||
#define ODB_PGSQL_POLYMORPHIC_OBJECT_STATEMENTS_HXX | #define ODB_PGSQL_POLYMORPHIC_OBJECT_STATEMENTS_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <cstddef> // std::size_t | #include <cstddef> // std::size_t | |||
#include <odb/forward.hxx> | #include <odb/forward.hxx> | |||
skipping to change at line 333 | skipping to change at line 333 | |||
persist_.reset ( | persist_.reset ( | |||
new (details::shared) insert_statement_type ( | new (details::shared) insert_statement_type ( | |||
conn_, | conn_, | |||
object_traits::persist_statement_name, | object_traits::persist_statement_name, | |||
object_traits::persist_statement, | object_traits::persist_statement, | |||
object_traits::versioned, // Process if versioned. | object_traits::versioned, // Process if versioned. | |||
object_traits::persist_statement_types, | object_traits::persist_statement_types, | |||
insert_column_count, | insert_column_count, | |||
insert_image_binding_, | insert_image_binding_, | |||
insert_image_native_binding_, | insert_image_native_binding_, | |||
object_traits::auto_id, | 0, | |||
false)); | false)); | |||
return *persist_; | return *persist_; | |||
} | } | |||
select_statement_type& | select_statement_type& | |||
find_statement (std::size_t d) | find_statement (std::size_t d) | |||
{ | { | |||
std::size_t i (object_traits::depth - d); | std::size_t i (object_traits::depth - d); | |||
details::shared_ptr<select_statement_type>& p (find_[i]); | details::shared_ptr<select_statement_type>& p (find_[i]); | |||
skipping to change at line 408 | skipping to change at line 408 | |||
} | } | |||
// Extra (container, section) statement cache. | // Extra (container, section) statement cache. | |||
// | // | |||
extra_statement_cache_type& | extra_statement_cache_type& | |||
extra_statement_cache () | extra_statement_cache () | |||
{ | { | |||
return extra_statement_cache_.get ( | return extra_statement_cache_.get ( | |||
conn_, | conn_, | |||
image_, | image_, | |||
id_image (), | ||||
id_image_binding (), | id_image_binding (), | |||
&id_image_binding (), // Note, not id+version. | &id_image_binding (), // Note, not id+version. | |||
root_statements_.id_image_native_binding (), | root_statements_.id_image_native_binding (), | |||
object_traits::find_statement_types); | object_traits::find_statement_types); | |||
} | } | |||
public: | public: | |||
// select = total - id - separate_load + base::select | // select = total - id - separate_load + base::select | |||
// insert = total - inverse | // insert = total - inverse | |||
// update = total - inverse - id - readonly - separate_update | // update = total - inverse - id - readonly - separate_update | |||
skipping to change at line 449 | skipping to change at line 450 | |||
polymorphic_derived_object_statements ( | polymorphic_derived_object_statements ( | |||
const polymorphic_derived_object_statements&); | const polymorphic_derived_object_statements&); | |||
polymorphic_derived_object_statements& | polymorphic_derived_object_statements& | |||
operator= (const polymorphic_derived_object_statements&); | operator= (const polymorphic_derived_object_statements&); | |||
private: | private: | |||
root_statements_type& root_statements_; | root_statements_type& root_statements_; | |||
base_statements_type& base_statements_; | base_statements_type& base_statements_; | |||
extra_statement_cache_ptr<extra_statement_cache_type, image_type> | extra_statement_cache_ptr<extra_statement_cache_type, | |||
extra_statement_cache_; | image_type, | |||
id_image_type> extra_statement_cache_; | ||||
image_type image_; | image_type image_; | |||
// Select binding. Here we are have an array of statements/bindings | // Select binding. Here we are have an array of statements/bindings | |||
// one for each depth. In other words, if we have classes root, base, | // one for each depth. In other words, if we have classes root, base, | |||
// and derived, then we have the following array of statements: | // and derived, then we have the following array of statements: | |||
// | // | |||
// [0] d + b + r | // [0] d + b + r | |||
// [1] d + b | // [1] d + b | |||
// [2] d | // [2] d | |||
End of changes. 4 change blocks. | ||||
4 lines changed or deleted | 6 lines changed or added | |||
polymorphic-object-statements.txx | polymorphic-object-statements.txx | |||
---|---|---|---|---|
// file : odb/pgsql/polymorphic-object-statements.txx | // file : odb/pgsql/polymorphic-object-statements.txx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#include <cstring> // std::memset | #include <cstring> // std::memset | |||
#include <odb/callback.hxx> | #include <odb/callback.hxx> | |||
#include <odb/exceptions.hxx> | #include <odb/exceptions.hxx> | |||
#include <odb/pgsql/connection.hxx> | #include <odb/pgsql/connection.hxx> | |||
#include <odb/pgsql/transaction.hxx> | #include <odb/pgsql/transaction.hxx> | |||
#include <odb/pgsql/statement-cache.hxx> | #include <odb/pgsql/statement-cache.hxx> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
prepared-query.hxx | prepared-query.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/prepared-query.hxx | // file : odb/pgsql/prepared-query.hxx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_PREPARED_QUERY_HXX | #ifndef ODB_PGSQL_PREPARED_QUERY_HXX | |||
#define ODB_PGSQL_PREPARED_QUERY_HXX | #define ODB_PGSQL_PREPARED_QUERY_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <odb/prepared-query.hxx> | #include <odb/prepared-query.hxx> | |||
#include <odb/pgsql/version.hxx> | #include <odb/pgsql/version.hxx> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
query-dynamic.hxx | query-dynamic.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/query-dynamic.hxx | // file : odb/pgsql/query-dynamic.hxx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_QUERY_DYNAMIC_HXX | #ifndef ODB_PGSQL_QUERY_DYNAMIC_HXX | |||
#define ODB_PGSQL_QUERY_DYNAMIC_HXX | #define ODB_PGSQL_QUERY_DYNAMIC_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <odb/query.hxx> | #include <odb/query.hxx> | |||
#include <odb/query-dynamic.hxx> | #include <odb/query-dynamic.hxx> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
query-dynamic.ixx | query-dynamic.ixx | |||
---|---|---|---|---|
// file : odb/pgsql/query-dynamic.ixx | // file : odb/pgsql/query-dynamic.ixx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
namespace odb | namespace odb | |||
{ | { | |||
namespace pgsql | namespace pgsql | |||
{ | { | |||
// | // | |||
// | // | |||
template <typename T, database_type_id ID> | template <typename T, database_type_id ID> | |||
inline query_column<T, ID>:: | inline query_column<T, ID>:: | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
query-dynamic.txx | query-dynamic.txx | |||
---|---|---|---|---|
// file : odb/pgsql/query-dynamic.txx | // file : odb/pgsql/query-dynamic.txx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
namespace odb | namespace odb | |||
{ | { | |||
namespace pgsql | namespace pgsql | |||
{ | { | |||
template <typename T, database_type_id ID> | template <typename T, database_type_id ID> | |||
details::shared_ptr<query_param> | details::shared_ptr<query_param> | |||
query_param_factory_impl (const void* val, bool by_ref) | query_param_factory_impl (const void* val, bool by_ref) | |||
{ | { | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
query.hxx | query.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/query.hxx | // file : odb/pgsql/query.hxx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_QUERY_HXX | #ifndef ODB_PGSQL_QUERY_HXX | |||
#define ODB_PGSQL_QUERY_HXX | #define ODB_PGSQL_QUERY_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <string> | #include <string> | |||
#include <vector> | #include <vector> | |||
#include <cstddef> // std::size_t | #include <cstddef> // std::size_t | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
query.ixx | query.ixx | |||
---|---|---|---|---|
// file : odb/pgsql/query.ixx | // file : odb/pgsql/query.ixx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
namespace odb | namespace odb | |||
{ | { | |||
namespace pgsql | namespace pgsql | |||
{ | { | |||
inline native_binding& query_base:: | inline native_binding& query_base:: | |||
parameters_binding () const | parameters_binding () const | |||
{ | { | |||
return native_binding_; | return native_binding_; | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
query.txx | query.txx | |||
---|---|---|---|---|
// file : odb/pgsql/query.txx | // file : odb/pgsql/query.txx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
namespace odb | namespace odb | |||
{ | { | |||
namespace pgsql | namespace pgsql | |||
{ | { | |||
// | // | |||
// query_base | // query_base | |||
// | // | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
section-statements.hxx | section-statements.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/section-statements.hxx | // file : odb/pgsql/section-statements.hxx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_SECTION_STATEMENTS_HXX | #ifndef ODB_PGSQL_SECTION_STATEMENTS_HXX | |||
#define ODB_PGSQL_SECTION_STATEMENTS_HXX | #define ODB_PGSQL_SECTION_STATEMENTS_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <cstddef> // std::size_t | #include <cstddef> // std::size_t | |||
#include <odb/forward.hxx> | #include <odb/forward.hxx> | |||
skipping to change at line 39 | skipping to change at line 39 | |||
// Template argument is the section traits type. | // Template argument is the section traits type. | |||
// | // | |||
template <typename T, typename ST> | template <typename T, typename ST> | |||
class section_statements | class section_statements | |||
{ | { | |||
public: | public: | |||
typedef ST traits; | typedef ST traits; | |||
typedef typename traits::image_type image_type; | typedef typename traits::image_type image_type; | |||
typedef typename traits::id_image_type id_image_type; | ||||
typedef pgsql::select_statement select_statement_type; | typedef pgsql::select_statement select_statement_type; | |||
typedef pgsql::update_statement update_statement_type; | typedef pgsql::update_statement update_statement_type; | |||
typedef pgsql::connection connection_type; | typedef pgsql::connection connection_type; | |||
section_statements (connection_type&, | section_statements (connection_type&, | |||
image_type&, | image_type&, | |||
id_image_type&, | ||||
binding& id, | binding& id, | |||
binding& idv, | binding& idv, | |||
native_binding& idn, | native_binding& idn, | |||
const Oid* idt); | const Oid* idt); | |||
connection_type& | connection_type& | |||
connection () {return conn_;} | connection () {return conn_;} | |||
const schema_version_migration& | const schema_version_migration& | |||
version_migration (const char* name = "") const | version_migration (const char* name = "") const | |||
End of changes. 3 change blocks. | ||||
1 lines changed or deleted | 3 lines changed or added | |||
section-statements.txx | section-statements.txx | |||
---|---|---|---|---|
// file : odb/pgsql/section-statements.txx | // file : odb/pgsql/section-statements.txx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#include <cstring> // std::memset | #include <cstring> // std::memset | |||
namespace odb | namespace odb | |||
{ | { | |||
namespace pgsql | namespace pgsql | |||
{ | { | |||
template <typename T, typename ST> | template <typename T, typename ST> | |||
section_statements<T, ST>:: | section_statements<T, ST>:: | |||
section_statements (connection_type& conn, | section_statements (connection_type& conn, | |||
image_type& im, | image_type& im, | |||
id_image_type&, | ||||
binding& id, | binding& id, | |||
binding& idv, | binding& idv, | |||
native_binding& idn, | native_binding& idn, | |||
const Oid* idt) | const Oid* idt) | |||
: conn_ (conn), | : conn_ (conn), | |||
svm_ (0), | svm_ (0), | |||
image_ (im), | image_ (im), | |||
id_binding_ (id), | id_binding_ (id), | |||
idv_binding_ (idv), | idv_binding_ (idv), | |||
id_native_binding_ (idn), | id_native_binding_ (idn), | |||
End of changes. 2 change blocks. | ||||
1 lines changed or deleted | 2 lines changed or added | |||
simple-object-result.hxx | simple-object-result.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/simple-object-result.hxx | // file : odb/pgsql/simple-object-result.hxx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_SIMPLE_OBJECT_RESULT_HXX | #ifndef ODB_PGSQL_SIMPLE_OBJECT_RESULT_HXX | |||
#define ODB_PGSQL_SIMPLE_OBJECT_RESULT_HXX | #define ODB_PGSQL_SIMPLE_OBJECT_RESULT_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <cstddef> // std::size_t | #include <cstddef> // std::size_t | |||
#include <odb/schema-version.hxx> | #include <odb/schema-version.hxx> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
simple-object-result.txx | simple-object-result.txx | |||
---|---|---|---|---|
// file : odb/pgsql/simple-object-result.txx | // file : odb/pgsql/simple-object-result.txx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#include <cassert> | #include <cassert> | |||
#include <odb/callback.hxx> | #include <odb/callback.hxx> | |||
#include <odb/pgsql/simple-object-statements.hxx> | #include <odb/pgsql/simple-object-statements.hxx> | |||
namespace odb | namespace odb | |||
{ | { | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
simple-object-statements.hxx | simple-object-statements.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/simple-object-statements.hxx | // file : odb/pgsql/simple-object-statements.hxx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_SIMPLE_OBJECT_STATEMENTS_HXX | #ifndef ODB_PGSQL_SIMPLE_OBJECT_STATEMENTS_HXX | |||
#define ODB_PGSQL_SIMPLE_OBJECT_STATEMENTS_HXX | #define ODB_PGSQL_SIMPLE_OBJECT_STATEMENTS_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <vector> | #include <vector> | |||
#include <cassert> | #include <cassert> | |||
#include <cstddef> // std::size_t | #include <cstddef> // std::size_t | |||
skipping to change at line 42 | skipping to change at line 42 | |||
// The extra_statement_cache class is only defined (and used) in | // The extra_statement_cache class is only defined (and used) in | |||
// the generated source file. However, object_statements may be | // the generated source file. However, object_statements may be | |||
// referenced from another source file in the case of a polymorphic | // referenced from another source file in the case of a polymorphic | |||
// hierarchy (though in this case the extra statement cache is | // hierarchy (though in this case the extra statement cache is | |||
// not used). As a result, we cannot have a by-value member and | // not used). As a result, we cannot have a by-value member and | |||
// instead will store a pointer and lazily allocate the cache if | // instead will store a pointer and lazily allocate the cache if | |||
// and when needed. We will also need to store a pointer to the | // and when needed. We will also need to store a pointer to the | |||
// deleter function which will be initialized during allocation | // deleter function which will be initialized during allocation | |||
// (at that point we know that the cache class is defined). | // (at that point we know that the cache class is defined). | |||
// | // | |||
template <typename T, typename I> | template <typename T, typename I, typename ID> | |||
struct extra_statement_cache_ptr | struct extra_statement_cache_ptr | |||
{ | { | |||
typedef I image_type; | typedef I image_type; | |||
typedef ID id_image_type; | ||||
typedef pgsql::connection connection_type; | typedef pgsql::connection connection_type; | |||
extra_statement_cache_ptr (): p_ (0) {} | extra_statement_cache_ptr (): p_ (0) {} | |||
~extra_statement_cache_ptr () | ~extra_statement_cache_ptr () | |||
{ | { | |||
if (p_ != 0) | if (p_ != 0) | |||
(this->*deleter_) (0, 0, 0, 0, 0, 0); | (this->*deleter_) (0, 0, 0, 0, 0, 0, 0); | |||
} | } | |||
T& | T& | |||
get (connection_type& c, | get (connection_type& c, | |||
image_type& im, | image_type& im, | |||
id_image_type& idim, | ||||
binding& id, | binding& id, | |||
binding* idv, | binding* idv, | |||
native_binding& idn, | native_binding& idn, | |||
const Oid* idt) | const Oid* idt) | |||
{ | { | |||
if (p_ == 0) | if (p_ == 0) | |||
allocate (&c, &im, &id, (idv != 0 ? idv : &id), &idn, idt); | allocate (&c, &im, &idim, &id, (idv != 0 ? idv : &id), &idn, idt) ; | |||
return *p_; | return *p_; | |||
} | } | |||
private: | private: | |||
void | void | |||
allocate (connection_type*, | allocate (connection_type*, | |||
image_type*, | image_type*, id_image_type*, | |||
binding*, binding*, native_binding*, const Oid*); | binding*, binding*, native_binding*, const Oid*); | |||
private: | private: | |||
T* p_; | T* p_; | |||
void (extra_statement_cache_ptr::*deleter_) ( | void (extra_statement_cache_ptr::*deleter_) ( | |||
connection_type*, | connection_type*, | |||
image_type*, | image_type*, id_image_type*, | |||
binding*, binding*, native_binding*, const Oid*); | binding*, binding*, native_binding*, const Oid*); | |||
}; | }; | |||
template <typename T, typename I> | template <typename T, typename I, typename ID> | |||
void extra_statement_cache_ptr<T, I>:: | void extra_statement_cache_ptr<T, I, ID>:: | |||
allocate (connection_type* c, | allocate (connection_type* c, | |||
image_type* im, | image_type* im, id_image_type* idim, | |||
binding* id, binding* idv, native_binding* idn, const Oid* id t) | binding* id, binding* idv, native_binding* idn, const Oid* id t) | |||
{ | { | |||
// To reduce object code size, this function acts as both allocator | // To reduce object code size, this function acts as both allocator | |||
// and deleter. | // and deleter. | |||
// | // | |||
if (p_ == 0) | if (p_ == 0) | |||
{ | { | |||
p_ = new T (*c, *im, *id, *idv, *idn, idt); | p_ = new T (*c, *im, *idim, *id, *idv, *idn, idt); | |||
deleter_ = &extra_statement_cache_ptr<T, I>::allocate; | deleter_ = &extra_statement_cache_ptr<T, I, ID>::allocate; | |||
} | } | |||
else | else | |||
delete p_; | delete p_; | |||
} | } | |||
// | // | |||
// Implementation for objects with object id. | // Implementation for objects with object id. | |||
// | // | |||
class LIBODB_PGSQL_EXPORT object_statements_base: public statements_bas e | class LIBODB_PGSQL_EXPORT object_statements_base: public statements_bas e | |||
skipping to change at line 384 | skipping to change at line 386 | |||
persist_.reset ( | persist_.reset ( | |||
new (details::shared) insert_statement_type ( | new (details::shared) insert_statement_type ( | |||
conn_, | conn_, | |||
object_traits::persist_statement_name, | object_traits::persist_statement_name, | |||
object_traits::persist_statement, | object_traits::persist_statement, | |||
object_traits::versioned, // Process if versioned. | object_traits::versioned, // Process if versioned. | |||
object_traits::persist_statement_types, | object_traits::persist_statement_types, | |||
insert_column_count, | insert_column_count, | |||
insert_image_binding_, | insert_image_binding_, | |||
insert_image_native_binding_, | insert_image_native_binding_, | |||
object_traits::auto_id, | (object_traits::auto_id ? &id_image_binding_ : 0), | |||
false)); | false)); | |||
return *persist_; | return *persist_; | |||
} | } | |||
select_statement_type& | select_statement_type& | |||
find_statement () | find_statement () | |||
{ | { | |||
if (find_ == 0) | if (find_ == 0) | |||
find_.reset ( | find_.reset ( | |||
skipping to change at line 474 | skipping to change at line 476 | |||
} | } | |||
// Extra (container, section) statement cache. | // Extra (container, section) statement cache. | |||
// | // | |||
extra_statement_cache_type& | extra_statement_cache_type& | |||
extra_statement_cache () | extra_statement_cache () | |||
{ | { | |||
return extra_statement_cache_.get ( | return extra_statement_cache_.get ( | |||
conn_, | conn_, | |||
image_, | image_, | |||
id_image_, | ||||
id_image_binding_, | id_image_binding_, | |||
od_.id_image_binding (), | od_.id_image_binding (), | |||
id_image_native_binding_, | id_image_native_binding_, | |||
object_traits::find_statement_types); | object_traits::find_statement_types); | |||
} | } | |||
public: | public: | |||
// select = total - separate_load | // select = total - separate_load | |||
// insert = total - inverse - managed_optimistic - auto_id | // insert = total - inverse - managed_optimistic - auto_id | |||
// update = total - inverse - managed_optimistic - id - readonly - | // update = total - inverse - managed_optimistic - id - readonly - | |||
skipping to change at line 524 | skipping to change at line 527 | |||
void | void | |||
load_delayed_ (const schema_version_migration*); | load_delayed_ (const schema_version_migration*); | |||
void | void | |||
clear_delayed_ (); | clear_delayed_ (); | |||
protected: | protected: | |||
template <typename T1> | template <typename T1> | |||
friend class polymorphic_derived_object_statements; | friend class polymorphic_derived_object_statements; | |||
extra_statement_cache_ptr<extra_statement_cache_type, image_type> | extra_statement_cache_ptr<extra_statement_cache_type, | |||
extra_statement_cache_; | image_type, | |||
id_image_type> extra_statement_cache_; | ||||
image_type image_; | image_type image_; | |||
// Select binding. | // Select binding. | |||
// | // | |||
std::size_t select_image_version_; | std::size_t select_image_version_; | |||
binding select_image_binding_; | binding select_image_binding_; | |||
bind select_image_bind_[select_column_count]; | bind select_image_bind_[select_column_count]; | |||
bool select_image_truncated_[select_column_count]; | bool select_image_truncated_[select_column_count]; | |||
End of changes. 14 change blocks. | ||||
14 lines changed or deleted | 18 lines changed or added | |||
simple-object-statements.ixx | simple-object-statements.ixx | |||
---|---|---|---|---|
// file : odb/pgsql/simple-object-statements.ixx | // file : odb/pgsql/simple-object-statements.ixx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
namespace odb | namespace odb | |||
{ | { | |||
namespace pgsql | namespace pgsql | |||
{ | { | |||
// | // | |||
// auto_unlock | // auto_unlock | |||
// | // | |||
inline object_statements_base::auto_unlock:: | inline object_statements_base::auto_unlock:: | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
simple-object-statements.txx | simple-object-statements.txx | |||
---|---|---|---|---|
// file : odb/pgsql/simple-object-statements.txx | // file : odb/pgsql/simple-object-statements.txx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#include <cstring> // std::memset | #include <cstring> // std::memset | |||
#include <odb/callback.hxx> | #include <odb/callback.hxx> | |||
#include <odb/exceptions.hxx> | #include <odb/exceptions.hxx> | |||
#include <odb/pgsql/connection.hxx> | #include <odb/pgsql/connection.hxx> | |||
#include <odb/pgsql/traits-calls.hxx> | #include <odb/pgsql/traits-calls.hxx> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
statement-cache.hxx | statement-cache.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/statement-cache.hxx | // file : odb/pgsql/statement-cache.hxx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_STATEMENT_CACHE_HXX | #ifndef ODB_PGSQL_STATEMENT_CACHE_HXX | |||
#define ODB_PGSQL_STATEMENT_CACHE_HXX | #define ODB_PGSQL_STATEMENT_CACHE_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <map> | #include <map> | |||
#include <typeinfo> | #include <typeinfo> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
statement-cache.txx | statement-cache.txx | |||
---|---|---|---|---|
// file : odb/pgsql/statement-cache.txx | // file : odb/pgsql/statement-cache.txx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#include <odb/pgsql/database.hxx> | #include <odb/pgsql/database.hxx> | |||
namespace odb | namespace odb | |||
{ | { | |||
namespace pgsql | namespace pgsql | |||
{ | { | |||
template <typename T> | template <typename T> | |||
typename object_traits_impl<T, id_pgsql>::statements_type& | typename object_traits_impl<T, id_pgsql>::statements_type& | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
statement.hxx | statement.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/statement.hxx | // file : odb/pgsql/statement.hxx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_STATEMENT_HXX | #ifndef ODB_PGSQL_STATEMENT_HXX | |||
#define ODB_PGSQL_STATEMENT_HXX | #define ODB_PGSQL_STATEMENT_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <string> | #include <string> | |||
#include <cstddef> // std::size_t | #include <cstddef> // std::size_t | |||
skipping to change at line 281 | skipping to change at line 281 | |||
~insert_statement (); | ~insert_statement (); | |||
insert_statement (connection_type& conn, | insert_statement (connection_type& conn, | |||
const std::string& name, | const std::string& name, | |||
const std::string& text, | const std::string& text, | |||
bool process_text, | bool process_text, | |||
const Oid* types, | const Oid* types, | |||
std::size_t types_count, | std::size_t types_count, | |||
binding& param, | binding& param, | |||
native_binding& native_param, | native_binding& native_param, | |||
bool returning); | binding* returning); | |||
insert_statement (connection_type& conn, | insert_statement (connection_type& conn, | |||
const char* name, | const char* name, | |||
const char* text, | const char* text, | |||
bool process_text, | bool process_text, | |||
const Oid* types, | const Oid* types, | |||
std::size_t types_count, | std::size_t types_count, | |||
binding& param, | binding& param, | |||
native_binding& native_param, | native_binding& native_param, | |||
bool returning, | binding* returning, | |||
bool copy_name_text = true); | bool copy_name_text = true); | |||
// Return true if successful and false if the row is a duplicate. | // Return true if successful and false if the row is a duplicate. | |||
// All other errors are reported by throwing exceptions. | // All other errors are reported by throwing exceptions. | |||
// | // | |||
bool | bool | |||
execute (); | execute (); | |||
unsigned long long | ||||
id () | ||||
{ | ||||
return id_; | ||||
} | ||||
private: | private: | |||
insert_statement (const insert_statement&); | insert_statement (const insert_statement&); | |||
insert_statement& operator= (const insert_statement&); | insert_statement& operator= (const insert_statement&); | |||
private: | private: | |||
binding& param_; | binding& param_; | |||
native_binding& native_param_; | native_binding& native_param_; | |||
binding* returning_; | ||||
bool returning_; | ||||
unsigned long long id_; | ||||
}; | }; | |||
class LIBODB_PGSQL_EXPORT update_statement: public statement | class LIBODB_PGSQL_EXPORT update_statement: public statement | |||
{ | { | |||
public: | public: | |||
virtual | virtual | |||
~update_statement (); | ~update_statement (); | |||
update_statement (connection_type& conn, | update_statement (connection_type& conn, | |||
const std::string& name, | const std::string& name, | |||
End of changes. 5 change blocks. | ||||
12 lines changed or deleted | 4 lines changed or added | |||
statements-base.hxx | statements-base.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/statements-base.hxx | // file : odb/pgsql/statements-base.hxx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_STATEMENTS_BASE_HXX | #ifndef ODB_PGSQL_STATEMENTS_BASE_HXX | |||
#define ODB_PGSQL_STATEMENTS_BASE_HXX | #define ODB_PGSQL_STATEMENTS_BASE_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <odb/schema-version.hxx> | #include <odb/schema-version.hxx> | |||
#include <odb/details/shared-ptr.hxx> | #include <odb/details/shared-ptr.hxx> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
tracer.hxx | tracer.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/tracer.hxx | // file : odb/pgsql/tracer.hxx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_TRACER_HXX | #ifndef ODB_PGSQL_TRACER_HXX | |||
#define ODB_PGSQL_TRACER_HXX | #define ODB_PGSQL_TRACER_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <odb/tracer.hxx> | #include <odb/tracer.hxx> | |||
#include <odb/pgsql/version.hxx> | #include <odb/pgsql/version.hxx> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
traits-calls.hxx | traits-calls.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/traits-calls.hxx | // file : odb/pgsql/traits-calls.hxx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_TRAITS_CALLS_HXX | #ifndef ODB_PGSQL_TRAITS_CALLS_HXX | |||
#define ODB_PGSQL_TRAITS_CALLS_HXX | #define ODB_PGSQL_TRAITS_CALLS_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <cstddef> // std::size_t | #include <cstddef> // std::size_t | |||
#include <odb/forward.hxx> | #include <odb/forward.hxx> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
traits.hxx | traits.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/traits.hxx | // file : odb/pgsql/traits.hxx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_TRAITS_HXX | #ifndef ODB_PGSQL_TRAITS_HXX | |||
#define ODB_PGSQL_TRAITS_HXX | #define ODB_PGSQL_TRAITS_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <odb/details/config.hxx> // ODB_CXX11 | #include <odb/details/config.hxx> // ODB_CXX11 | |||
#include <string> | #include <string> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
transaction-impl.hxx | transaction-impl.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/transaction-impl.hxx | // file : odb/pgsql/transaction-impl.hxx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_TRANSACTION_IMPL_HXX | #ifndef ODB_PGSQL_TRANSACTION_IMPL_HXX | |||
#define ODB_PGSQL_TRANSACTION_IMPL_HXX | #define ODB_PGSQL_TRANSACTION_IMPL_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <odb/transaction.hxx> | #include <odb/transaction.hxx> | |||
#include <odb/pgsql/version.hxx> | #include <odb/pgsql/version.hxx> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
transaction-impl.ixx | transaction-impl.ixx | |||
---|---|---|---|---|
// file : odb/pgsql/transaction-impl.ixx | // file : odb/pgsql/transaction-impl.ixx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
namespace odb | namespace odb | |||
{ | { | |||
namespace pgsql | namespace pgsql | |||
{ | { | |||
inline transaction_impl::connection_type& transaction_impl:: | inline transaction_impl::connection_type& transaction_impl:: | |||
connection () | connection () | |||
{ | { | |||
return *connection_; | return *connection_; | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
transaction.hxx | transaction.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/transaction.hxx | // file : odb/pgsql/transaction.hxx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_TRANSACTION_HXX | #ifndef ODB_PGSQL_TRANSACTION_HXX | |||
#define ODB_PGSQL_TRANSACTION_HXX | #define ODB_PGSQL_TRANSACTION_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <odb/transaction.hxx> | #include <odb/transaction.hxx> | |||
#include <odb/pgsql/version.hxx> | #include <odb/pgsql/version.hxx> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
transaction.ixx | transaction.ixx | |||
---|---|---|---|---|
// file : odb/pgsql/transaction.ixx | // file : odb/pgsql/transaction.ixx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#include <odb/pgsql/database.hxx> | #include <odb/pgsql/database.hxx> | |||
#include <odb/pgsql/transaction-impl.hxx> | #include <odb/pgsql/transaction-impl.hxx> | |||
namespace odb | namespace odb | |||
{ | { | |||
namespace pgsql | namespace pgsql | |||
{ | { | |||
inline transaction:: | inline transaction:: | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
version.hxx | version.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/version.hxx | // file : odb/pgsql/version.hxx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_VERSION_HXX | #ifndef ODB_PGSQL_VERSION_HXX | |||
#define ODB_PGSQL_VERSION_HXX | #define ODB_PGSQL_VERSION_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <odb/pgsql/details/config.hxx> | #include <odb/pgsql/details/config.hxx> | |||
#include <odb/version.hxx> | #include <odb/version.hxx> | |||
skipping to change at line 32 | skipping to change at line 32 | |||
// Version AABBCCDD | // Version AABBCCDD | |||
// 2.0.0 02000000 | // 2.0.0 02000000 | |||
// 2.1.0 02010000 | // 2.1.0 02010000 | |||
// 2.1.1 02010100 | // 2.1.1 02010100 | |||
// 2.2.0.a1 02019901 | // 2.2.0.a1 02019901 | |||
// 3.0.0.b2 02999952 | // 3.0.0.b2 02999952 | |||
// | // | |||
// Check that we have compatible ODB version. | // Check that we have compatible ODB version. | |||
// | // | |||
#if ODB_VERSION != 20300 | #if ODB_VERSION != 20400 | |||
# error incompatible odb interface version detected | # error incompatible odb interface version detected | |||
#endif | #endif | |||
// libodb-pgsql version: odb interface version plus the bugfix | // libodb-pgsql version: odb interface version plus the bugfix | |||
// version. | // version. | |||
// | // | |||
#define LIBODB_PGSQL_VERSION 2030100 | #define LIBODB_PGSQL_VERSION 2040000 | |||
#define LIBODB_PGSQL_VERSION_STR "2.3.1" | #define LIBODB_PGSQL_VERSION_STR "2.4.0" | |||
#include <odb/post.hxx> | #include <odb/post.hxx> | |||
#endif // ODB_PGSQL_VERSION_HXX | #endif // ODB_PGSQL_VERSION_HXX | |||
End of changes. 3 change blocks. | ||||
4 lines changed or deleted | 4 lines changed or added | |||
view-result.hxx | view-result.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/view-result.hxx | // file : odb/pgsql/view-result.hxx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_VIEW_RESULT_HXX | #ifndef ODB_PGSQL_VIEW_RESULT_HXX | |||
#define ODB_PGSQL_VIEW_RESULT_HXX | #define ODB_PGSQL_VIEW_RESULT_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <cstddef> // std::size_t | #include <cstddef> // std::size_t | |||
#include <odb/schema-version.hxx> | #include <odb/schema-version.hxx> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
view-result.txx | view-result.txx | |||
---|---|---|---|---|
// file : odb/pgsql/view-result.txx | // file : odb/pgsql/view-result.txx | |||
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#include <odb/callback.hxx> | #include <odb/callback.hxx> | |||
#include <odb/pgsql/view-statements.hxx> | #include <odb/pgsql/view-statements.hxx> | |||
namespace odb | namespace odb | |||
{ | { | |||
namespace pgsql | namespace pgsql | |||
{ | { | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
view-statements.hxx | view-statements.hxx | |||
---|---|---|---|---|
// file : odb/pgsql/view-statements.hxx | // file : odb/pgsql/view-statements.hxx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#ifndef ODB_PGSQL_VIEW_STATEMENTS_HXX | #ifndef ODB_PGSQL_VIEW_STATEMENTS_HXX | |||
#define ODB_PGSQL_VIEW_STATEMENTS_HXX | #define ODB_PGSQL_VIEW_STATEMENTS_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <cstddef> // std::size_t | #include <cstddef> // std::size_t | |||
#include <odb/forward.hxx> | #include <odb/forward.hxx> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
view-statements.txx | view-statements.txx | |||
---|---|---|---|---|
// file : odb/pgsql/view-statements.txx | // file : odb/pgsql/view-statements.txx | |||
// copyright : Copyright (c) 2005-2013 Code Synthesis Tools CC | // copyright : Copyright (c) 2005-2015 Code Synthesis Tools CC | |||
// license : GNU GPL v2; see accompanying LICENSE file | // license : GNU GPL v2; see accompanying LICENSE file | |||
#include <cstddef> // std::size_t | #include <cstddef> // std::size_t | |||
#include <cstring> // std::memset | #include <cstring> // std::memset | |||
namespace odb | namespace odb | |||
{ | { | |||
namespace pgsql | namespace pgsql | |||
{ | { | |||
template <typename T> | template <typename T> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||