auto-handle.hxx | auto-handle.hxx | |||
---|---|---|---|---|
// file : odb/mysql/auto-handle.hxx | // file : odb/mysql/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_MYSQL_AUTO_HANDLE_HXX | #ifndef ODB_MYSQL_AUTO_HANDLE_HXX | |||
#define ODB_MYSQL_AUTO_HANDLE_HXX | #define ODB_MYSQL_AUTO_HANDLE_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <odb/mysql/version.hxx> | #include <odb/mysql/version.hxx> | |||
#include <odb/mysql/mysql.hxx> | #include <odb/mysql/mysql.hxx> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
binding.hxx | binding.hxx | |||
---|---|---|---|---|
// file : odb/mysql/binding.hxx | // file : odb/mysql/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_MYSQL_BINDING_HXX | #ifndef ODB_MYSQL_BINDING_HXX | |||
#define ODB_MYSQL_BINDING_HXX | #define ODB_MYSQL_BINDING_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 | |||
config.h | config.h | |||
---|---|---|---|---|
/* odb/mysql/details/config.h. Generated from config.h.in by configure. * / | /* odb/mysql/details/config.h. Generated from config.h.in by configure. * / | |||
/* file : odb/mysql/details/config.h.in | /* file : odb/mysql/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_MYSQL_DETAILS_CONFIG_H | #ifndef ODB_MYSQL_DETAILS_CONFIG_H | |||
#define ODB_MYSQL_DETAILS_CONFIG_H | #define ODB_MYSQL_DETAILS_CONFIG_H | |||
/* #undef LIBODB_MYSQL_STATIC_LIB */ | /* #undef LIBODB_MYSQL_STATIC_LIB */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
config.hxx | config.hxx | |||
---|---|---|---|---|
// file : odb/mysql/details/config.hxx | // file : odb/mysql/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_MYSQL_DETAILS_CONFIG_HXX | #ifndef ODB_MYSQL_DETAILS_CONFIG_HXX | |||
#define ODB_MYSQL_DETAILS_CONFIG_HXX | #define ODB_MYSQL_DETAILS_CONFIG_HXX | |||
// no pre | // no pre | |||
#ifdef _MSC_VER | #ifdef _MSC_VER | |||
# if !defined(LIBODB_MYSQL_INCLUDE_SHORT) && !defined (LIBODB_MYSQL_INCLUD E_LONG) | # if !defined(LIBODB_MYSQL_INCLUDE_SHORT) && !defined (LIBODB_MYSQL_INCLUD E_LONG) | |||
# define LIBODB_MYSQL_INCLUDE_SHORT 1 | # define LIBODB_MYSQL_INCLUDE_SHORT 1 | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
connection-factory.hxx | connection-factory.hxx | |||
---|---|---|---|---|
// file : odb/mysql/connection-factory.hxx | // file : odb/mysql/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_MYSQL_CONNECTION_FACTORY_HXX | #ifndef ODB_MYSQL_CONNECTION_FACTORY_HXX | |||
#define ODB_MYSQL_CONNECTION_FACTORY_HXX | #define ODB_MYSQL_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 116 | skipping to change at line 116 | |||
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_MYSQL_EXPORT pooled_connection: public connection | |||
{ | { | |||
public: | public: | |||
pooled_connection (database_type&); | pooled_connection (database_type&); | |||
pooled_connection (database_type&, MYSQL*); | pooled_connection (database_type&, MYSQL*); | |||
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/mysql/connection.hxx | // file : odb/mysql/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_MYSQL_CONNECTION_HXX | #ifndef ODB_MYSQL_CONNECTION_HXX | |||
#define ODB_MYSQL_CONNECTION_HXX | #define ODB_MYSQL_CONNECTION_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <vector> | #include <vector> | |||
#include <odb/connection.hxx> | #include <odb/connection.hxx> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
connection.ixx | connection.ixx | |||
---|---|---|---|---|
// file : odb/mysql/connection.ixx | // file : odb/mysql/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 mysql | namespace mysql | |||
{ | { | |||
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/mysql/container-statements.hxx | // file : odb/mysql/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_MYSQL_CONTAINER_STATEMENTS_HXX | #ifndef ODB_MYSQL_CONTAINER_STATEMENTS_HXX | |||
#define ODB_MYSQL_CONTAINER_STATEMENTS_HXX | #define ODB_MYSQL_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 131 | skipping to change at line 131 | |||
insert_statement_type& | insert_statement_type& | |||
insert_statement () | insert_statement () | |||
{ | { | |||
if (insert_ == 0) | if (insert_ == 0) | |||
insert_.reset ( | insert_.reset ( | |||
new (details::shared) insert_statement_type ( | new (details::shared) insert_statement_type ( | |||
conn_, | conn_, | |||
insert_text_, | insert_text_, | |||
versioned_, // Process if versioned. | versioned_, // Process if versioned. | |||
insert_image_binding_, | insert_image_binding_, | |||
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. | ||||
1 lines changed or deleted | 2 lines changed or added | |||
container-statements.txx | container-statements.txx | |||
---|---|---|---|---|
// file : odb/mysql/container-statements.txx | // file : odb/mysql/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 mysql | namespace mysql | |||
{ | { | |||
// 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/mysql/details/conversion.hxx | // file : odb/mysql/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_MYSQL_DETAILS_CONVERSION_HXX | #ifndef ODB_MYSQL_DETAILS_CONVERSION_HXX | |||
#define ODB_MYSQL_DETAILS_CONVERSION_HXX | #define ODB_MYSQL_DETAILS_CONVERSION_HXX | |||
#include <odb/mysql/traits.hxx> | #include <odb/mysql/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/mysql/database.hxx | // file : odb/mysql/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_MYSQL_DATABASE_HXX | #ifndef ODB_MYSQL_DATABASE_HXX | |||
#define ODB_MYSQL_DATABASE_HXX | #define ODB_MYSQL_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 183 | skipping to change at line 183 | |||
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 378 | skipping to change at line 382 | |||
query (const std::string&, bool cache = true); | query (const std::string&, bool cache = true); | |||
template <typename T> | template <typename T> | |||
result<T> | result<T> | |||
query (const mysql::query_base&, bool cache = true); | query (const mysql::query_base&, bool cache = true); | |||
template <typename T> | template <typename T> | |||
result<T> | result<T> | |||
query (const odb::query_base&, bool cache = true); | query (const odb::query_base&, bool cache = true); | |||
// 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 mysql::query_base&); | ||||
template <typename T> | ||||
bool | ||||
query_one (const mysql::query_base&, T& object); | ||||
template <typename T> | ||||
T | ||||
query_value (const mysql::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/mysql/database.ixx | // file : odb/mysql/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/mysql/transaction.hxx> | #include <odb/mysql/transaction.hxx> | |||
namespace odb | namespace odb | |||
{ | { | |||
namespace mysql | namespace mysql | |||
{ | { | |||
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_mysql> (obj); | return persist_<T, id_mysql> (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_mysql> (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 437 | skipping to change at line 444 | |||
template <typename T> | template <typename T> | |||
inline result<T> database:: | inline result<T> database:: | |||
query (const odb::query_base& q, bool cache) | query (const odb::query_base& q, bool cache) | |||
{ | { | |||
// Translate to native query. | // Translate to native query. | |||
// | // | |||
return query<T> (mysql::query_base (q), cache); | return query<T> (mysql::query_base (q), cache); | |||
} | } | |||
template <typename T> | template <typename T> | |||
inline typename object_traits<T>::pointer_type database:: | ||||
query_one () | ||||
{ | ||||
return query_one<T> (mysql::query_base ()); | ||||
} | ||||
template <typename T> | ||||
inline bool database:: | ||||
query_one (T& o) | ||||
{ | ||||
return query_one<T> (mysql::query_base (), o); | ||||
} | ||||
template <typename T> | ||||
inline T database:: | ||||
query_value () | ||||
{ | ||||
return query_value<T> (mysql::query_base ()); | ||||
} | ||||
template <typename T> | ||||
inline typename object_traits<T>::pointer_type database:: | ||||
query_one (const char* q) | ||||
{ | ||||
return query_one<T> (mysql::query_base (q)); | ||||
} | ||||
template <typename T> | ||||
inline bool database:: | ||||
query_one (const char* q, T& o) | ||||
{ | ||||
return query_one<T> (mysql::query_base (q), o); | ||||
} | ||||
template <typename T> | ||||
inline T database:: | ||||
query_value (const char* q) | ||||
{ | ||||
return query_value<T> (mysql::query_base (q)); | ||||
} | ||||
template <typename T> | ||||
inline typename object_traits<T>::pointer_type database:: | ||||
query_one (const std::string& q) | ||||
{ | ||||
return query_one<T> (mysql::query_base (q)); | ||||
} | ||||
template <typename T> | ||||
inline bool database:: | ||||
query_one (const std::string& q, T& o) | ||||
{ | ||||
return query_one<T> (mysql::query_base (q), o); | ||||
} | ||||
template <typename T> | ||||
inline T database:: | ||||
query_value (const std::string& q) | ||||
{ | ||||
return query_value<T> (mysql::query_base (q)); | ||||
} | ||||
template <typename T> | ||||
inline typename object_traits<T>::pointer_type database:: | ||||
query_one (const mysql::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_mysql> (q); | ||||
} | ||||
template <typename T> | ||||
inline bool database:: | ||||
query_one (const mysql::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_mysql> (q, o); | ||||
} | ||||
template <typename T> | ||||
inline T database:: | ||||
query_value (const mysql::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_mysql> (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> (mysql::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> (mysql::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> (mysql::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, mysql::query_base (q)); | return prepare_query<T> (n, mysql::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 | |||
enum.hxx | enum.hxx | |||
---|---|---|---|---|
// file : odb/mysql/enums.hxx | // file : odb/mysql/enums.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_MYSQL_ENUMS_HXX | #ifndef ODB_MYSQL_ENUMS_HXX | |||
#define ODB_MYSQL_ENUMS_HXX | #define ODB_MYSQL_ENUMS_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <cstddef> // std::size_t | #include <cstddef> // std::size_t | |||
#include <cstring> // std::memmove | #include <cstring> // std::memmove | |||
#include <cassert> | #include <cassert> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
error.hxx | error.hxx | |||
---|---|---|---|---|
// file : odb/mysql/error.hxx | // file : odb/mysql/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_MYSQL_ERROR_HXX | #ifndef ODB_MYSQL_ERROR_HXX | |||
#define ODB_MYSQL_ERROR_HXX | #define ODB_MYSQL_ERROR_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <odb/mysql/mysql.hxx> | #include <odb/mysql/mysql.hxx> | |||
#include <odb/mysql/version.hxx> | #include <odb/mysql/version.hxx> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
exceptions.hxx | exceptions.hxx | |||
---|---|---|---|---|
// file : odb/mysql/exceptions.hxx | // file : odb/mysql/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_MYSQL_EXCEPTIONS_HXX | #ifndef ODB_MYSQL_EXCEPTIONS_HXX | |||
#define ODB_MYSQL_EXCEPTIONS_HXX | #define ODB_MYSQL_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 52 | skipping to change at line 52 | |||
const std::string& | const std::string& | |||
message () const | message () const | |||
{ | { | |||
return message_; | return message_; | |||
} | } | |||
virtual const char* | virtual const char* | |||
what () const throw (); | what () const throw (); | |||
virtual database_exception* | ||||
clone () const; | ||||
private: | private: | |||
unsigned int error_; | unsigned int error_; | |||
std::string sqlstate_; | std::string sqlstate_; | |||
std::string message_; | std::string message_; | |||
std::string what_; | std::string what_; | |||
}; | }; | |||
struct LIBODB_MYSQL_EXPORT cli_exception: odb::exception | struct LIBODB_MYSQL_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 mysql::database_exception; | using mysql::database_exception; | |||
using mysql::cli_exception; | using mysql::cli_exception; | |||
} | } | |||
} | } | |||
End of changes. 3 change blocks. | ||||
1 lines changed or deleted | 7 lines changed or added | |||
export.hxx | export.hxx | |||
---|---|---|---|---|
// file : odb/mysql/details/export.hxx | // file : odb/mysql/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_MYSQL_DETAILS_EXPORT_HXX | #ifndef ODB_MYSQL_DETAILS_EXPORT_HXX | |||
#define ODB_MYSQL_DETAILS_EXPORT_HXX | #define ODB_MYSQL_DETAILS_EXPORT_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <odb/mysql/details/config.hxx> | #include <odb/mysql/details/config.hxx> | |||
#ifdef LIBODB_MYSQL_STATIC_LIB | #ifdef LIBODB_MYSQL_STATIC_LIB | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
forward.hxx | forward.hxx | |||
---|---|---|---|---|
// file : odb/mysql/forward.hxx | // file : odb/mysql/forward.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_MYSQL_FORWARD_HXX | #ifndef ODB_MYSQL_FORWARD_HXX | |||
#define ODB_MYSQL_FORWARD_HXX | #define ODB_MYSQL_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 | |||
mysql-types.hxx | mysql-types.hxx | |||
---|---|---|---|---|
// file : odb/mysql/mysql-types.hxx | // file : odb/mysql/mysql-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_MYSQL_MYSQL_TYPES_HXX | #ifndef ODB_MYSQL_MYSQL_TYPES_HXX | |||
#define ODB_MYSQL_MYSQL_TYPES_HXX | #define ODB_MYSQL_MYSQL_TYPES_HXX | |||
#include <odb/mysql/details/config.hxx> | #include <odb/mysql/details/config.hxx> | |||
typedef char my_bool; | typedef char my_bool; | |||
typedef struct st_mysql_bind MYSQL_BIND; | typedef struct st_mysql_bind MYSQL_BIND; | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
mysql.hxx | mysql.hxx | |||
---|---|---|---|---|
// file : odb/mysql/mysql.hxx | // file : odb/mysql/mysql.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_MYSQL_MYSQL_HXX | #ifndef ODB_MYSQL_MYSQL_HXX | |||
#define ODB_MYSQL_MYSQL_HXX | #define ODB_MYSQL_MYSQL_HXX | |||
#include <odb/mysql/details/config.hxx> | #include <odb/mysql/details/config.hxx> | |||
#include <odb/mysql/mysql-types.hxx> | #include <odb/mysql/mysql-types.hxx> | |||
#ifdef _WIN32 | #ifdef _WIN32 | |||
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/mysql/no-id-object-result.hxx | // file : odb/mysql/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_MYSQL_NO_ID_OBJECT_RESULT_HXX | #ifndef ODB_MYSQL_NO_ID_OBJECT_RESULT_HXX | |||
#define ODB_MYSQL_NO_ID_OBJECT_RESULT_HXX | #define ODB_MYSQL_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/mysql/no-id-object-result.txx | // file : odb/mysql/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/exceptions.hxx> // result_not_cached | #include <odb/exceptions.hxx> // result_not_cached | |||
#include <odb/mysql/no-id-object-statements.hxx> | #include <odb/mysql/no-id-object-statements.hxx> | |||
namespace odb | namespace odb | |||
{ | { | |||
namespace mysql | namespace mysql | |||
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/mysql/no-id-object-statements.hxx | // file : odb/mysql/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_MYSQL_NO_ID_OBJECT_STATEMENTS_HXX | #ifndef ODB_MYSQL_NO_ID_OBJECT_STATEMENTS_HXX | |||
#define ODB_MYSQL_NO_ID_OBJECT_STATEMENTS_HXX | #define ODB_MYSQL_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 91 | skipping to change at line 91 | |||
insert_statement_type& | insert_statement_type& | |||
persist_statement () | persist_statement () | |||
{ | { | |||
if (persist_ == 0) | if (persist_ == 0) | |||
persist_.reset ( | persist_.reset ( | |||
new (details::shared) insert_statement_type ( | new (details::shared) insert_statement_type ( | |||
conn_, | conn_, | |||
object_traits::persist_statement, | object_traits::persist_statement, | |||
object_traits::versioned, // Process if versioned. | object_traits::versioned, // Process if versioned. | |||
insert_image_binding_, | insert_image_binding_, | |||
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 select_column_count = | static const std::size_t select_column_count = | |||
End of changes. 2 change blocks. | ||||
1 lines changed or deleted | 2 lines changed or added | |||
no-id-object-statements.txx | no-id-object-statements.txx | |||
---|---|---|---|---|
// file : odb/mysql/no-id-object-statements.txx | // file : odb/mysql/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 mysql | namespace mysql | |||
{ | { | |||
template <typename T> | template <typename T> | |||
no_id_object_statements<T>:: | no_id_object_statements<T>:: | |||
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/mysql/polymorphic-object-result.hxx | // file : odb/mysql/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_MYSQL_POLYMORPHIC_OBJECT_RESULT_HXX | #ifndef ODB_MYSQL_POLYMORPHIC_OBJECT_RESULT_HXX | |||
#define ODB_MYSQL_POLYMORPHIC_OBJECT_RESULT_HXX | #define ODB_MYSQL_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/mysql/polymorphic-object-result.txx | // file : odb/mysql/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> // result_not_cached | #include <odb/exceptions.hxx> // result_not_cached | |||
#include <odb/mysql/polymorphic-object-statements.hxx> | #include <odb/mysql/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/mysql/polymorphic-object-statements.hxx | // file : odb/mysql/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_MYSQL_POLYMORPHIC_OBJECT_STATEMENTS_HXX | #ifndef ODB_MYSQL_POLYMORPHIC_OBJECT_STATEMENTS_HXX | |||
#define ODB_MYSQL_POLYMORPHIC_OBJECT_STATEMENTS_HXX | #define ODB_MYSQL_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 317 | skipping to change at line 317 | |||
insert_statement_type& | insert_statement_type& | |||
persist_statement () | persist_statement () | |||
{ | { | |||
if (persist_ == 0) | if (persist_ == 0) | |||
persist_.reset ( | persist_.reset ( | |||
new (details::shared) insert_statement_type ( | new (details::shared) insert_statement_type ( | |||
conn_, | conn_, | |||
object_traits::persist_statement, | object_traits::persist_statement, | |||
object_traits::versioned, // Process if versioned. | object_traits::versioned, // Process if versioned. | |||
insert_image_binding_, | insert_image_binding_, | |||
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 379 | skipping to change at line 380 | |||
} | } | |||
// 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. | |||
} | } | |||
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 | |||
// | // | |||
static const std::size_t id_column_count = | static const std::size_t id_column_count = | |||
skipping to change at line 417 | skipping to change at line 419 | |||
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. | ||||
3 lines changed or deleted | 6 lines changed or added | |||
polymorphic-object-statements.txx | polymorphic-object-statements.txx | |||
---|---|---|---|---|
// file : odb/mysql/polymorphic-object-statements.txx | // file : odb/mysql/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/mysql/connection.hxx> | #include <odb/mysql/connection.hxx> | |||
#include <odb/mysql/transaction.hxx> | #include <odb/mysql/transaction.hxx> | |||
#include <odb/mysql/statement-cache.hxx> | #include <odb/mysql/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/mysql/prepared-query.hxx | // file : odb/mysql/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_MYSQL_PREPARED_QUERY_HXX | #ifndef ODB_MYSQL_PREPARED_QUERY_HXX | |||
#define ODB_MYSQL_PREPARED_QUERY_HXX | #define ODB_MYSQL_PREPARED_QUERY_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <odb/prepared-query.hxx> | #include <odb/prepared-query.hxx> | |||
#include <odb/mysql/version.hxx> | #include <odb/mysql/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/mysql/query-dynamic.hxx | // file : odb/mysql/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_MYSQL_QUERY_DYNAMIC_HXX | #ifndef ODB_MYSQL_QUERY_DYNAMIC_HXX | |||
#define ODB_MYSQL_QUERY_DYNAMIC_HXX | #define ODB_MYSQL_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/mysql/query-dynamic.ixx | // file : odb/mysql/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 mysql | namespace mysql | |||
{ | { | |||
// | // | |||
// | // | |||
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/mysql/query-dynamic.txx | // file : odb/mysql/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 mysql | namespace mysql | |||
{ | { | |||
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/mysql/query.hxx | // file : odb/mysql/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_MYSQL_QUERY_HXX | #ifndef ODB_MYSQL_QUERY_HXX | |||
#define ODB_MYSQL_QUERY_HXX | #define ODB_MYSQL_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/mysql/query.ixx | // file : odb/mysql/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 mysql | namespace mysql | |||
{ | { | |||
inline binding& query_base:: | inline binding& query_base:: | |||
parameters_binding () const | parameters_binding () const | |||
{ | { | |||
return binding_; | return binding_; | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
query.txx | query.txx | |||
---|---|---|---|---|
// file : odb/mysql/query.txx | // file : odb/mysql/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 mysql | namespace mysql | |||
{ | { | |||
// | // | |||
// 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/mysql/section-statements.hxx | // file : odb/mysql/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_MYSQL_SECTION_STATEMENTS_HXX | #ifndef ODB_MYSQL_SECTION_STATEMENTS_HXX | |||
#define ODB_MYSQL_SECTION_STATEMENTS_HXX | #define ODB_MYSQL_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 mysql::select_statement select_statement_type; | typedef mysql::select_statement select_statement_type; | |||
typedef mysql::update_statement update_statement_type; | typedef mysql::update_statement update_statement_type; | |||
typedef mysql::connection connection_type; | typedef mysql::connection connection_type; | |||
section_statements (connection_type&, | section_statements (connection_type&, | |||
image_type&, | image_type&, id_image_type&, | |||
binding& id, binding& idv); | binding& id, binding& idv); | |||
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 | |||
{ | { | |||
if (svm_ == 0) | if (svm_ == 0) | |||
svm_ = &conn_.database ().schema_version_migration (name); | svm_ = &conn_.database ().schema_version_migration (name); | |||
End of changes. 3 change blocks. | ||||
2 lines changed or deleted | 3 lines changed or added | |||
section-statements.txx | section-statements.txx | |||
---|---|---|---|---|
// file : odb/mysql/section-statements.txx | // file : odb/mysql/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 mysql | namespace mysql | |||
{ | { | |||
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& idv) | binding& id, binding& idv) | |||
: conn_ (conn), | : conn_ (conn), | |||
svm_ (0), | svm_ (0), | |||
image_ (im), | image_ (im), | |||
id_binding_ (id), | id_binding_ (id), | |||
idv_binding_ (idv), | idv_binding_ (idv), | |||
select_image_binding_ (select_image_bind_, | select_image_binding_ (select_image_bind_, | |||
select_column_count + | select_column_count + | |||
managed_optimistic_load_column_count), | managed_optimistic_load_column_count), | |||
update_image_binding_ (update_image_bind_, | update_image_binding_ (update_image_bind_, | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
simple-object-result.hxx | simple-object-result.hxx | |||
---|---|---|---|---|
// file : odb/mysql/simple-object-result.hxx | // file : odb/mysql/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_MYSQL_SIMPLE_OBJECT_RESULT_HXX | #ifndef ODB_MYSQL_SIMPLE_OBJECT_RESULT_HXX | |||
#define ODB_MYSQL_SIMPLE_OBJECT_RESULT_HXX | #define ODB_MYSQL_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/mysql/simple-object-result.txx | // file : odb/mysql/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/exceptions.hxx> // result_not_cached | #include <odb/exceptions.hxx> // result_not_cached | |||
#include <odb/mysql/simple-object-statements.hxx> | #include <odb/mysql/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/mysql/simple-object-statements.hxx | // file : odb/mysql/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_MYSQL_SIMPLE_OBJECT_STATEMENTS_HXX | #ifndef ODB_MYSQL_SIMPLE_OBJECT_STATEMENTS_HXX | |||
#define ODB_MYSQL_SIMPLE_OBJECT_STATEMENTS_HXX | #define ODB_MYSQL_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 mysql::connection connection_type; | typedef mysql::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); | (this->*deleter_) (0, 0, 0, 0, 0); | |||
} | } | |||
T& | T& | |||
get (connection_type& c, image_type& im, binding& id, binding* idv) | get (connection_type& c, | |||
image_type& im, id_image_type& idim, | ||||
binding& id, binding* idv) | ||||
{ | { | |||
if (p_ == 0) | if (p_ == 0) | |||
allocate (&c, &im, &id, (idv != 0 ? idv : &id)); | allocate (&c, &im, &idim, &id, (idv != 0 ? idv : &id)); | |||
return *p_; | return *p_; | |||
} | } | |||
private: | private: | |||
void | void | |||
allocate (connection_type*, image_type*, binding*, binding*); | allocate (connection_type*, | |||
image_type*, id_image_type*, | ||||
binding*, binding*); | ||||
private: | private: | |||
T* p_; | T* p_; | |||
void (extra_statement_cache_ptr::*deleter_) ( | void (extra_statement_cache_ptr::*deleter_) ( | |||
connection_type*, image_type*, binding*, binding*); | connection_type*, image_type*, id_image_type*, binding*, binding*); | |||
}; | }; | |||
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, image_type* im, binding* id, binding* idv | allocate (connection_type* c, | |||
) | image_type* im, id_image_type* idim, | |||
binding* id, binding* idv) | ||||
{ | { | |||
// 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); | p_ = new T (*c, *im, *idim, *id, *idv); | |||
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_MYSQL_EXPORT object_statements_base: public statements_bas e | class LIBODB_MYSQL_EXPORT object_statements_base: public statements_bas e | |||
skipping to change at line 356 | skipping to change at line 363 | |||
insert_statement_type& | insert_statement_type& | |||
persist_statement () | persist_statement () | |||
{ | { | |||
if (persist_ == 0) | if (persist_ == 0) | |||
persist_.reset ( | persist_.reset ( | |||
new (details::shared) insert_statement_type ( | new (details::shared) insert_statement_type ( | |||
conn_, | conn_, | |||
object_traits::persist_statement, | object_traits::persist_statement, | |||
object_traits::versioned, // Process if versioned. | object_traits::versioned, // Process if versioned. | |||
insert_image_binding_, | insert_image_binding_, | |||
(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 429 | skipping to change at line 437 | |||
return *od_.erase_; | return *od_.erase_; | |||
} | } | |||
// 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_, image_, id_image_binding_, od_.id_image_binding ()); | conn_, | |||
image_, id_image_, | ||||
id_image_binding_, od_.id_image_binding ()); | ||||
} | } | |||
public: | public: | |||
// select = total - separate_load | // select = total - separate_load | |||
// insert = total - inverse - managed_optimistic | // insert = total - inverse - managed_optimistic | |||
// update = total - inverse - managed_optimistic - id - readonly | // update = total - inverse - managed_optimistic - id - readonly | |||
// - separate_update | // - separate_update | |||
// | // | |||
static const std::size_t id_column_count = | static const std::size_t id_column_count = | |||
object_traits::id_column_count; | object_traits::id_column_count; | |||
skipping to change at line 475 | skipping to change at line 485 | |||
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_; | |||
MYSQL_BIND select_image_bind_[select_column_count]; | MYSQL_BIND select_image_bind_[select_column_count]; | |||
my_bool select_image_truncated_[select_column_count]; | my_bool select_image_truncated_[select_column_count]; | |||
End of changes. 13 change blocks. | ||||
16 lines changed or deleted | 26 lines changed or added | |||
simple-object-statements.ixx | simple-object-statements.ixx | |||
---|---|---|---|---|
// file : odb/mysql/simple-object-statements.ixx | // file : odb/mysql/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 mysql | namespace mysql | |||
{ | { | |||
// | // | |||
// 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/mysql/simple-object-statements.txx | // file : odb/mysql/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/mysql/connection.hxx> | #include <odb/mysql/connection.hxx> | |||
#include <odb/mysql/traits-calls.hxx> | #include <odb/mysql/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/mysql/statement-cache.hxx | // file : odb/mysql/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_MYSQL_STATEMENT_CACHE_HXX | #ifndef ODB_MYSQL_STATEMENT_CACHE_HXX | |||
#define ODB_MYSQL_STATEMENT_CACHE_HXX | #define ODB_MYSQL_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/mysql/statement-cache.txx | // file : odb/mysql/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/mysql/database.hxx> | #include <odb/mysql/database.hxx> | |||
namespace odb | namespace odb | |||
{ | { | |||
namespace mysql | namespace mysql | |||
{ | { | |||
template <typename T> | template <typename T> | |||
typename object_traits_impl<T, id_mysql>::statements_type& | typename object_traits_impl<T, id_mysql>::statements_type& | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
statement.hxx | statement.hxx | |||
---|---|---|---|---|
// file : odb/mysql/statement.hxx | // file : odb/mysql/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_MYSQL_STATEMENT_HXX | #ifndef ODB_MYSQL_STATEMENT_HXX | |||
#define ODB_MYSQL_STATEMENT_HXX | #define ODB_MYSQL_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 208 | skipping to change at line 208 | |||
select_statement (const select_statement&); | select_statement (const select_statement&); | |||
select_statement& operator= (const select_statement&); | select_statement& operator= (const select_statement&); | |||
private: | private: | |||
bool end_; | bool end_; | |||
bool cached_; | bool cached_; | |||
bool freed_; | bool freed_; | |||
std::size_t rows_; | std::size_t rows_; | |||
std::size_t size_; | std::size_t size_; | |||
#if MYSQL_VERSION_ID >= 50503 | ||||
bool out_params_; | ||||
#endif | ||||
binding* param_; | binding* param_; | |||
std::size_t param_version_; | std::size_t param_version_; | |||
binding& result_; | binding& result_; | |||
std::size_t result_version_; | std::size_t result_version_; | |||
}; | }; | |||
struct LIBODB_MYSQL_EXPORT auto_result | struct LIBODB_MYSQL_EXPORT auto_result | |||
{ | { | |||
explicit auto_result (select_statement& s): s_ (s) {} | explicit auto_result (select_statement& s): s_ (s) {} | |||
skipping to change at line 237 | skipping to change at line 241 | |||
class LIBODB_MYSQL_EXPORT insert_statement: public statement | class LIBODB_MYSQL_EXPORT insert_statement: public statement | |||
{ | { | |||
public: | public: | |||
virtual | virtual | |||
~insert_statement (); | ~insert_statement (); | |||
insert_statement (connection_type& conn, | insert_statement (connection_type& conn, | |||
const std::string& text, | const std::string& text, | |||
bool process_text, | bool process_text, | |||
binding& param); | binding& param, | |||
binding* returning); | ||||
insert_statement (connection_type& conn, | insert_statement (connection_type& conn, | |||
const char* text, | const char* text, | |||
bool process_text, | bool process_text, | |||
binding& param, | binding& param, | |||
binding* returning, | ||||
bool copy_text = true); | bool copy_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 (); | ||||
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_; | |||
std::size_t param_version_; | std::size_t param_version_; | |||
binding* returning_; | ||||
}; | }; | |||
class LIBODB_MYSQL_EXPORT update_statement: public statement | class LIBODB_MYSQL_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& text, | const std::string& text, | |||
End of changes. 6 change blocks. | ||||
5 lines changed or deleted | 10 lines changed or added | |||
statements-base.hxx | statements-base.hxx | |||
---|---|---|---|---|
// file : odb/mysql/statements-base.hxx | // file : odb/mysql/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_MYSQL_STATEMENTS_BASE_HXX | #ifndef ODB_MYSQL_STATEMENTS_BASE_HXX | |||
#define ODB_MYSQL_STATEMENTS_BASE_HXX | #define ODB_MYSQL_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/mysql/tracer.hxx | // file : odb/mysql/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_MYSQL_TRACER_HXX | #ifndef ODB_MYSQL_TRACER_HXX | |||
#define ODB_MYSQL_TRACER_HXX | #define ODB_MYSQL_TRACER_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <odb/tracer.hxx> | #include <odb/tracer.hxx> | |||
#include <odb/mysql/version.hxx> | #include <odb/mysql/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/mysql/traits-calls.hxx | // file : odb/mysql/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_MYSQL_TRAITS_CALLS_HXX | #ifndef ODB_MYSQL_TRAITS_CALLS_HXX | |||
#define ODB_MYSQL_TRAITS_CALLS_HXX | #define ODB_MYSQL_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/mysql/traits.hxx | // file : odb/mysql/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_MYSQL_TRAITS_HXX | #ifndef ODB_MYSQL_TRAITS_HXX | |||
#define ODB_MYSQL_TRAITS_HXX | #define ODB_MYSQL_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/mysql/transaction-impl.hxx | // file : odb/mysql/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_MYSQL_TRANSACTION_IMPL_HXX | #ifndef ODB_MYSQL_TRANSACTION_IMPL_HXX | |||
#define ODB_MYSQL_TRANSACTION_IMPL_HXX | #define ODB_MYSQL_TRANSACTION_IMPL_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <odb/transaction.hxx> | #include <odb/transaction.hxx> | |||
#include <odb/mysql/version.hxx> | #include <odb/mysql/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/mysql/transaction-impl.ixx | // file : odb/mysql/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 mysql | namespace mysql | |||
{ | { | |||
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/mysql/transaction.hxx | // file : odb/mysql/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_MYSQL_TRANSACTION_HXX | #ifndef ODB_MYSQL_TRANSACTION_HXX | |||
#define ODB_MYSQL_TRANSACTION_HXX | #define ODB_MYSQL_TRANSACTION_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <odb/transaction.hxx> | #include <odb/transaction.hxx> | |||
#include <odb/mysql/version.hxx> | #include <odb/mysql/version.hxx> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
transaction.ixx | transaction.ixx | |||
---|---|---|---|---|
// file : odb/mysql/transaction.ixx | // file : odb/mysql/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/mysql/database.hxx> | #include <odb/mysql/database.hxx> | |||
#include <odb/mysql/transaction-impl.hxx> | #include <odb/mysql/transaction-impl.hxx> | |||
namespace odb | namespace odb | |||
{ | { | |||
namespace mysql | namespace mysql | |||
{ | { | |||
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/mysql/version.hxx | // file : odb/mysql/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_MYSQL_VERSION_HXX | #ifndef ODB_MYSQL_VERSION_HXX | |||
#define ODB_MYSQL_VERSION_HXX | #define ODB_MYSQL_VERSION_HXX | |||
#include <odb/pre.hxx> | #include <odb/pre.hxx> | |||
#include <odb/mysql/details/config.hxx> | #include <odb/mysql/details/config.hxx> | |||
#ifdef LIBODB_MYSQL_INCLUDE_SHORT | #ifdef LIBODB_MYSQL_INCLUDE_SHORT | |||
skipping to change at line 39 | skipping to change at line 39 | |||
// 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 | |||
// Check that we have a compatible MySQL version (5.0.3 or later). | // Check that we have a compatible MySQL version (5.0.3 or later). | |||
// | // | |||
#if !defined(MYSQL_VERSION_ID) || MYSQL_VERSION_ID < 50003 | #if !defined(MYSQL_VERSION_ID) || MYSQL_VERSION_ID < 50003 | |||
# error incompatible MySQL version detected | # error incompatible MySQL version detected | |||
#endif | #endif | |||
// libodb-mysql version: odb interface version plus the bugfix | // libodb-mysql version: odb interface version plus the bugfix | |||
// version. | // version. | |||
// | // | |||
#define LIBODB_MYSQL_VERSION 2030000 | #define LIBODB_MYSQL_VERSION 2040000 | |||
#define LIBODB_MYSQL_VERSION_STR "2.3.0" | #define LIBODB_MYSQL_VERSION_STR "2.4.0" | |||
#include <odb/post.hxx> | #include <odb/post.hxx> | |||
#endif // ODB_MYSQL_VERSION_HXX | #endif // ODB_MYSQL_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/mysql/view-result.hxx | // file : odb/mysql/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_MYSQL_VIEW_RESULT_HXX | #ifndef ODB_MYSQL_VIEW_RESULT_HXX | |||
#define ODB_MYSQL_VIEW_RESULT_HXX | #define ODB_MYSQL_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/mysql/view-result.txx | // file : odb/mysql/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/exceptions.hxx> | #include <odb/exceptions.hxx> | |||
#include <odb/mysql/view-statements.hxx> | #include <odb/mysql/view-statements.hxx> | |||
namespace odb | namespace odb | |||
{ | { | |||
namespace mysql | namespace mysql | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
view-statements.hxx | view-statements.hxx | |||
---|---|---|---|---|
// file : odb/mysql/view-statements.hxx | // file : odb/mysql/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_MYSQL_VIEW_STATEMENTS_HXX | #ifndef ODB_MYSQL_VIEW_STATEMENTS_HXX | |||
#define ODB_MYSQL_VIEW_STATEMENTS_HXX | #define ODB_MYSQL_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/mysql/view-statements.txx | // file : odb/mysql/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 mysql | namespace mysql | |||
{ | { | |||
template <typename T> | template <typename T> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||