backend-loader.h   backend-loader.h 
// //
// Copyright (C) 2008 Maciej Sobczak with contributions from Artyom Tonkikh // Copyright (C) 2008 Maciej Sobczak with contributions from Artyom Tonkikh
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_BACKEND_LOADER_H_INCLUDED #ifndef SOCI_BACKEND_LOADER_H_INCLUDED
#define SOCI_BACKEND_LOADER_H_INCLUDED #define SOCI_BACKEND_LOADER_H_INCLUDED
#include "soci-backend.h" #include "soci/soci-backend.h"
// std // std
#include <string> #include <string>
#include <vector> #include <vector>
namespace soci namespace soci
{ {
namespace dynamic_backends namespace dynamic_backends
{ {
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 blob-exchange.h   blob-exchange.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_BLOB_EXCHANGE_H_INCLUDED #ifndef SOCI_BLOB_EXCHANGE_H_INCLUDED
#define SOCI_BLOB_EXCHANGE_H_INCLUDED #define SOCI_BLOB_EXCHANGE_H_INCLUDED
#include "blob.h" #include "soci/blob.h"
#include "into-type.h" #include "soci/into-type.h"
#include "use-type.h" #include "soci/use-type.h"
// std // std
#include <string> #include <string>
namespace soci namespace soci
{ {
namespace details namespace details
{ {
template <> template <>
 End of changes. 1 change blocks. 
3 lines changed or deleted 3 lines changed or added


 blob.h   blob.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_BLOB_H_INCLUDED #ifndef SOCI_BLOB_H_INCLUDED
#define SOCI_BLOB_H_INCLUDED #define SOCI_BLOB_H_INCLUDED
#include "soci-config.h" #include "soci/soci-config.h"
// std // std
#include <cstddef> #include <cstddef>
namespace soci namespace soci
{ {
// basic blob operations // basic blob operations
class session; class session;
namespace details namespace details
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 boost-gregorian-date.h   boost-gregorian-date.h 
// //
// Copyright (C) 2008 Maciej Sobczak // Copyright (C) 2008 Maciej Sobczak
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_BOOST_GREGORIAN_DATE_H_INCLUDED #ifndef SOCI_BOOST_GREGORIAN_DATE_H_INCLUDED
#define SOCI_BOOST_GREGORIAN_DATE_H_INCLUDED #define SOCI_BOOST_GREGORIAN_DATE_H_INCLUDED
#include "type-conversion-traits.h" #include "soci/type-conversion-traits.h"
// boost // boost
#include <boost/date_time/gregorian/gregorian_types.hpp> #include <boost/date_time/gregorian/gregorian_types.hpp>
#include <boost/date_time/gregorian/conversion.hpp> #include <boost/date_time/gregorian/conversion.hpp>
// std // std
#include <ctime> #include <ctime>
namespace soci namespace soci
{ {
template<> template<>
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 boost-optional.h   boost-optional.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_BOOST_OPTIONAL_H_INCLUDED #ifndef SOCI_BOOST_OPTIONAL_H_INCLUDED
#define SOCI_BOOST_OPTIONAL_H_INCLUDED #define SOCI_BOOST_OPTIONAL_H_INCLUDED
#include "type-conversion-traits.h" #include "soci/type-conversion-traits.h"
// boost // boost
#include <boost/optional.hpp> #include <boost/optional.hpp>
namespace soci namespace soci
{ {
// tmp is uninitialized
#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ > 6)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
// simple fall-back for boost::optional // simple fall-back for boost::optional
template <typename T> template <typename T>
struct type_conversion<boost::optional<T> > struct type_conversion<boost::optional<T> >
{ {
typedef typename type_conversion<T>::base_type base_type; typedef typename type_conversion<T>::base_type base_type;
static void from_base(base_type const & in, indicator ind, static void from_base(base_type const & in, indicator ind,
boost::optional<T> & out) boost::optional<T> & out)
{ {
if (ind == i_null) if (ind == i_null)
skipping to change at line 55 skipping to change at line 61
} }
else else
{ {
ind = i_null; ind = i_null;
} }
} }
}; };
} // namespace soci } // namespace soci
#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ > 6)
#pragma GCC diagnostic pop
#endif
#endif // SOCI_BOOST_OPTIONAL_H_INCLUDED #endif // SOCI_BOOST_OPTIONAL_H_INCLUDED
 End of changes. 3 change blocks. 
1 lines changed or deleted 11 lines changed or added


 connection-parameters.h   connection-parameters.h 
// //
// Copyright (C) 2013 Vadim Zeitlin // Copyright (C) 2013 Vadim Zeitlin
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_CONNECTION_PARAMETERS_H_INCLUDED #ifndef SOCI_CONNECTION_PARAMETERS_H_INCLUDED
#define SOCI_CONNECTION_PARAMETERS_H_INCLUDED #define SOCI_CONNECTION_PARAMETERS_H_INCLUDED
#include "soci-config.h" #include "soci/soci-config.h"
#include <map> #include <map>
#include <string> #include <string>
namespace soci namespace soci
{ {
class backend_factory; class backend_factory;
// Simple container for the information used when opening a session. // Simple container for the information used when opening a session.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 connection-pool.h   connection-pool.h 
// //
// Copyright (C) 2008 Maciej Sobczak // Copyright (C) 2008 Maciej Sobczak
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_CONNECTION_POOL_H_INCLUDED #ifndef SOCI_CONNECTION_POOL_H_INCLUDED
#define SOCI_CONNECTION_POOL_H_INCLUDED #define SOCI_CONNECTION_POOL_H_INCLUDED
#include "soci-config.h" #include "soci/soci-config.h"
// std // std
#include <cstddef> #include <cstddef>
namespace soci namespace soci
{ {
class session; class session;
class SOCI_DECL connection_pool class SOCI_DECL connection_pool
{ {
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 error.h   error.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak // Copyright (C) 2004-2008 Maciej Sobczak
// Copyright (C) 2015 Vadim Zeitlin
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_ERROR_H_INCLUDED #ifndef SOCI_ERROR_H_INCLUDED
#define SOCI_ERROR_H_INCLUDED #define SOCI_ERROR_H_INCLUDED
#include "soci-config.h" #include "soci/soci-config.h"
// std // std
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
namespace soci namespace soci
{ {
class SOCI_DECL soci_error : public std::runtime_error class SOCI_DECL soci_error : public std::runtime_error
{ {
public: public:
explicit soci_error(std::string const & msg); explicit soci_error(std::string const & msg);
soci_error(soci_error const& e);
soci_error& operator=(soci_error const& e);
virtual ~soci_error() throw();
// Returns just the error message itself, without the context.
std::string get_error_message() const;
// Returns the full error message combining the message given to the ct
or
// with all the available context records.
virtual char const* what() const throw();
// This is used only by SOCI itself to provide more information about t
he
// exception as it bubbles up. It can be called multiple times, with th
e
// first call adding the lowest level context and the last one -- the
// highest level context.
void add_context(std::string const& context);
private:
// Optional extra information (currently just the context data).
class soci_error_extra_info* info_;
}; };
} // namespace soci } // namespace soci
#endif // SOCI_ERROR_H_INCLUDED #endif // SOCI_ERROR_H_INCLUDED
 End of changes. 3 change blocks. 
1 lines changed or deleted 27 lines changed or added


 exchange-traits.h   exchange-traits.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_EXCHANGE_TRAITS_H_INCLUDED #ifndef SOCI_EXCHANGE_TRAITS_H_INCLUDED
#define SOCI_EXCHANGE_TRAITS_H_INCLUDED #define SOCI_EXCHANGE_TRAITS_H_INCLUDED
#include "type-conversion-traits.h" #include "soci/type-conversion-traits.h"
#include "soci-backend.h" #include "soci/soci-backend.h"
// std // std
#include <ctime> #include <ctime>
#include <string> #include <string>
#include <vector> #include <vector>
namespace soci namespace soci
{ {
namespace details namespace details
{ {
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 into-type.h   into-type.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_INTO_TYPE_H_INCLUDED #ifndef SOCI_INTO_TYPE_H_INCLUDED
#define SOCI_INTO_TYPE_H_INCLUDED #define SOCI_INTO_TYPE_H_INCLUDED
#include "soci-backend.h" #include "soci/soci-backend.h"
#include "type-ptr.h" #include "soci/type-ptr.h"
#include "exchange-traits.h" #include "soci/exchange-traits.h"
// std // std
#include <cstddef> #include <cstddef>
#include <vector> #include <vector>
namespace soci namespace soci
{ {
class session; class session;
namespace details namespace details
 End of changes. 1 change blocks. 
3 lines changed or deleted 3 lines changed or added


 into.h   into.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_INTO_H_INCLUDED #ifndef SOCI_INTO_H_INCLUDED
#define SOCI_INTO_H_INCLUDED #define SOCI_INTO_H_INCLUDED
#include "into-type.h" #include "soci/into-type.h"
#include "exchange-traits.h" #include "soci/exchange-traits.h"
#include "type-conversion.h" #include "soci/type-conversion.h"
// std // std
#include <cstddef> #include <cstddef>
#include <vector> #include <vector>
namespace soci namespace soci
{ {
// the into function is a helper for defining output variables // the into function is a helper for defining output variables
// these helpers work with both basic and user-defined types thanks to // these helpers work with both basic and user-defined types thanks to
// the tag-dispatching, as defined in exchange_traits template // the tag-dispatching, as defined in exchange_traits template
 End of changes. 1 change blocks. 
3 lines changed or deleted 3 lines changed or added


 once-temp-type.h   once-temp-type.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_ONCE_TEMP_TYPE_H_INCLUDED #ifndef SOCI_ONCE_TEMP_TYPE_H_INCLUDED
#define SOCI_ONCE_TEMP_TYPE_H_INCLUDED #define SOCI_ONCE_TEMP_TYPE_H_INCLUDED
#include "ref-counted-statement.h" #include "soci/ref-counted-statement.h"
#include "prepare-temp-type.h" #include "soci/prepare-temp-type.h"
#if __cplusplus >= 201103L #if __cplusplus >= 201103L
#define SOCI_ONCE_TEMP_TYPE_NOEXCEPT noexcept(false) #define SOCI_ONCE_TEMP_TYPE_NOEXCEPT noexcept(false)
#else #else
#define SOCI_ONCE_TEMP_TYPE_NOEXCEPT #define SOCI_ONCE_TEMP_TYPE_NOEXCEPT
#endif #endif
namespace soci namespace soci
{ {
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 prepare-temp-type.h   prepare-temp-type.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_PREPARE_TEMP_TYPE_INCLUDED #ifndef SOCI_PREPARE_TEMP_TYPE_INCLUDED
#define SOCI_PREPARE_TEMP_TYPE_INCLUDED #define SOCI_PREPARE_TEMP_TYPE_INCLUDED
#include "into-type.h" #include "soci/into-type.h"
#include "use-type.h" #include "soci/use-type.h"
#include "use.h" #include "soci/use.h"
#include "ref-counted-prepare-info.h" #include "soci/ref-counted-prepare-info.h"
namespace soci namespace soci
{ {
namespace details namespace details
{ {
// this needs to be lightweight and copyable // this needs to be lightweight and copyable
class SOCI_DECL prepare_temp_type class SOCI_DECL prepare_temp_type
{ {
 End of changes. 1 change blocks. 
4 lines changed or deleted 4 lines changed or added


 procedure.h   procedure.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_PROCEDURE_H_INCLUDED #ifndef SOCI_PROCEDURE_H_INCLUDED
#define SOCI_PROCEDURE_H_INCLUDED #define SOCI_PROCEDURE_H_INCLUDED
#include "statement.h" #include "soci/statement.h"
namespace soci namespace soci
{ {
namespace details namespace details
{ {
class SOCI_DECL procedure_impl : public statement_impl class SOCI_DECL procedure_impl : public statement_impl
{ {
public: public:
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 query_transformation.h   query_transformation.h 
// //
// Copyright (C) 2013 Mateusz Loskot <mateusz@loskot.net> // Copyright (C) 2013 Mateusz Loskot <mateusz@loskot.net>
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_QUERY_TRANSFORMATION_H_INCLUDED #ifndef SOCI_QUERY_TRANSFORMATION_H_INCLUDED
#define SOCI_QUERY_TRANSFORMATION_H_INCLUDED #define SOCI_QUERY_TRANSFORMATION_H_INCLUDED
#include "soci-config.h" #include "soci/soci-config.h"
#include <functional> #include <functional>
#include <string> #include <string>
namespace soci namespace soci
{ {
namespace details namespace details
{ {
// Query transformation is a mechanism that enables user to apply // Query transformation is a mechanism that enables user to apply
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 ref-counted-prepare-info.h   ref-counted-prepare-info.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_REF_COUNTED_PREPARE_INFO_INCLUDED #ifndef SOCI_REF_COUNTED_PREPARE_INFO_INCLUDED
#define SOCI_REF_COUNTED_PREPARE_INFO_INCLUDED #define SOCI_REF_COUNTED_PREPARE_INFO_INCLUDED
#include "bind-values.h" #include "soci/bind-values.h"
#include "ref-counted-statement.h" #include "soci/ref-counted-statement.h"
// std // std
#include <string> #include <string>
#include <vector> #include <vector>
namespace soci namespace soci
{ {
class session; class session;
namespace details namespace details
skipping to change at line 37 skipping to change at line 36
class statement_impl; class statement_impl;
class into_type_base; class into_type_base;
// this class conveys only the statement text and the bind/define info // this class conveys only the statement text and the bind/define info
// it exists only to be passed to statement's constructor // it exists only to be passed to statement's constructor
class ref_counted_prepare_info : public ref_counted_statement_base class ref_counted_prepare_info : public ref_counted_statement_base
{ {
public: public:
ref_counted_prepare_info(session& s) ref_counted_prepare_info(session& s)
: ref_counted_statement_base(s) : ref_counted_statement_base(s)
, session_(s)
{} {}
void exchange(use_type_ptr const& u) { uses_.exchange(u); } void exchange(use_type_ptr const& u) { uses_.exchange(u); }
template <typename T, typename Indicator> template <typename T, typename Indicator>
void exchange(use_container<T, Indicator> const &uc) void exchange(use_container<T, Indicator> const &uc)
{ uses_.exchange(uc); } { uses_.exchange(uc); }
void exchange(into_type_ptr const& i) { intos_.exchange(i); } void exchange(into_type_ptr const& i) { intos_.exchange(i); }
template <typename T, typename Indicator> template <typename T, typename Indicator>
void exchange(into_container<T, Indicator> const &ic) void exchange(into_container<T, Indicator> const &ic)
{ intos_.exchange(ic); } { intos_.exchange(ic); }
void final_action(); void final_action();
private: private:
friend class statement_impl; friend class statement_impl;
friend class procedure_impl; friend class procedure_impl;
session& session_;
into_type_vector intos_; into_type_vector intos_;
use_type_vector uses_; use_type_vector uses_;
std::string get_query() const; std::string get_query() const;
}; };
} // namespace details } // namespace details
} // namespace soci } // namespace soci
 End of changes. 3 change blocks. 
6 lines changed or deleted 2 lines changed or added


 ref-counted-statement.h   ref-counted-statement.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_REF_COUNTED_STATEMENT_H_INCLUDED #ifndef SOCI_REF_COUNTED_STATEMENT_H_INCLUDED
#define SOCI_REF_COUNTED_STATEMENT_H_INCLUDED #define SOCI_REF_COUNTED_STATEMENT_H_INCLUDED
#include "statement.h" #include "soci/statement.h"
#include "into-type.h" #include "soci/into-type.h"
#include "use-type.h" #include "soci/use-type.h"
// std // std
#include <sstream> #include <sstream>
namespace soci namespace soci
{ {
namespace details namespace details
{ {
// this class is a base for both "once" and "prepare" statements // this class is a base for both "once" and "prepare" statements
 End of changes. 1 change blocks. 
3 lines changed or deleted 3 lines changed or added


 row-exchange.h   row-exchange.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_INTO_ROW_H_INCLUDED #ifndef SOCI_INTO_ROW_H_INCLUDED
#define SOCI_INTO_ROW_H_INCLUDED #define SOCI_INTO_ROW_H_INCLUDED
#include "into-type.h" #include "soci/into-type.h"
#include "exchange-traits.h" #include "soci/exchange-traits.h"
#include "row.h" #include "soci/row.h"
#include "statement.h" #include "soci/statement.h"
// std // std
#include <cstddef> #include <cstddef>
namespace soci namespace soci
{ {
namespace details namespace details
{ {
// Support selecting into a row for dynamic queries // Support selecting into a row for dynamic queries
 End of changes. 1 change blocks. 
4 lines changed or deleted 4 lines changed or added


 row.h   row.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_ROW_H_INCLUDED #ifndef SOCI_ROW_H_INCLUDED
#define SOCI_ROW_H_INCLUDED #define SOCI_ROW_H_INCLUDED
#include "type-holder.h" #include "soci/type-holder.h"
#include "soci-backend.h" #include "soci/soci-backend.h"
#include "type-conversion.h" #include "soci/type-conversion.h"
// std // std
#include <cassert>
#include <cstddef> #include <cstddef>
#include <map> #include <map>
#include <string> #include <string>
#include <vector> #include <vector>
namespace soci namespace soci
{ {
class SOCI_DECL column_properties class SOCI_DECL column_properties
{ {
skipping to change at line 68 skipping to change at line 67
holders_.push_back(new details::type_holder<T>(t)); holders_.push_back(new details::type_holder<T>(t));
indicators_.push_back(ind); indicators_.push_back(ind);
} }
column_properties const& get_properties(std::size_t pos) const; column_properties const& get_properties(std::size_t pos) const;
column_properties const& get_properties(std::string const& name) const; column_properties const& get_properties(std::string const& name) const;
template <typename T> template <typename T>
T get(std::size_t pos) const T get(std::size_t pos) const
{ {
assert(holders_.size() >= pos + 1);
typedef typename type_conversion<T>::base_type base_type; typedef typename type_conversion<T>::base_type base_type;
base_type const& baseVal = holders_[pos]->get<base_type>(); base_type const& baseVal = holders_.at(pos)->get<base_type>();
T ret; T ret;
type_conversion<T>::from_base(baseVal, *indicators_[pos], ret); type_conversion<T>::from_base(baseVal, *indicators_.at(pos), ret);
return ret; return ret;
} }
template <typename T> template <typename T>
T get(std::size_t pos, T const &nullValue) const T get(std::size_t pos, T const &nullValue) const
{ {
assert(holders_.size() >= pos + 1); if (i_null == *indicators_.at(pos))
if (i_null == *indicators_[pos])
{ {
return nullValue; return nullValue;
} }
return get<T>(pos); return get<T>(pos);
} }
template <typename T> template <typename T>
T get(std::string const &name) const T get(std::string const &name) const
{ {
 End of changes. 6 change blocks. 
11 lines changed or deleted 6 lines changed or added


 rowid-exchange.h   rowid-exchange.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_ROWID_EXCHANGE_H_INCLUDED #ifndef SOCI_ROWID_EXCHANGE_H_INCLUDED
#define SOCI_ROWID_EXCHANGE_H_INCLUDED #define SOCI_ROWID_EXCHANGE_H_INCLUDED
#include "rowid.h" #include "soci/rowid.h"
#include "into-type.h" #include "soci/into-type.h"
#include "use-type.h" #include "soci/use-type.h"
#include "exchange-traits.h" #include "soci/exchange-traits.h"
// std // std
#include <string> #include <string>
namespace soci namespace soci
{ {
namespace details namespace details
{ {
template <> template <>
 End of changes. 1 change blocks. 
4 lines changed or deleted 4 lines changed or added


 rowid.h   rowid.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_ROWID_H_INCLUDED #ifndef SOCI_ROWID_H_INCLUDED
#define SOCI_ROWID_H_INCLUDED #define SOCI_ROWID_H_INCLUDED
#include "soci-config.h" #include "soci/soci-config.h"
namespace soci namespace soci
{ {
class session; class session;
namespace details namespace details
{ {
class rowid_backend; class rowid_backend;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 rowset.h   rowset.h 
// //
// Copyright (C) 2006-2008 Mateusz Loskot // Copyright (C) 2006-2008 Mateusz Loskot
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_ROWSET_H_INCLUDED #ifndef SOCI_ROWSET_H_INCLUDED
#define SOCI_ROWSET_H_INCLUDED #define SOCI_ROWSET_H_INCLUDED
#include "statement.h" #include "soci/statement.h"
// std // std
#include <iterator> #include <iterator>
#include <memory> #include <memory>
namespace soci namespace soci
{ {
// //
// rowset iterator of input category. // rowset iterator of input category.
// //
skipping to change at line 44 skipping to change at line 44
// Constructors // Constructors
rowset_iterator() rowset_iterator()
: st_(0), define_(0) : st_(0), define_(0)
{} {}
rowset_iterator(statement & st, T & define) rowset_iterator(statement & st, T & define)
: st_(&st), define_(&define) : st_(&st), define_(&define)
{ {
assert(0 != st_);
assert(0 != define_);
assert(0 != st_->get_backend());
// Fetch first row to properly initialize iterator // Fetch first row to properly initialize iterator
++(*this); ++(*this);
} }
// Access operators // Access operators
reference operator*() const reference operator*() const
{ {
return (*define_); return (*define_);
} }
skipping to change at line 122 skipping to change at line 118
template <typename T> template <typename T>
class rowset_impl class rowset_impl
{ {
public: public:
typedef rowset_iterator<T> iterator; typedef rowset_iterator<T> iterator;
rowset_impl(details::prepare_temp_type const & prep) rowset_impl(details::prepare_temp_type const & prep)
: refs_(1), st_(new statement(prep)), define_(new T()) : refs_(1), st_(new statement(prep)), define_(new T())
{ {
assert(0 != st_.get());
assert(0 != define_.get());
st_->exchange_for_rowset(into(*define_)); st_->exchange_for_rowset(into(*define_));
st_->execute(); st_->execute();
} }
void incRef() void incRef()
{ {
++refs_; ++refs_;
} }
void decRef() void decRef()
skipping to change at line 157 skipping to change at line 150
iterator end() const iterator end() const
{ {
return iterator(); return iterator();
} }
private: private:
unsigned int refs_; unsigned int refs_;
#ifdef SOCI_CXX_C11
const std::unique_ptr<statement> st_;
const std::unique_ptr<T> define_;
#else
const std::auto_ptr<statement> st_; const std::auto_ptr<statement> st_;
const std::auto_ptr<T> define_; const std::auto_ptr<T> define_;
#endif
// Non-copyable // Non-copyable
rowset_impl(rowset_impl const &); rowset_impl(rowset_impl const &);
rowset_impl & operator=(rowset_impl const &); rowset_impl & operator=(rowset_impl const &);
}; // class rowset_impl }; // class rowset_impl
} // namespace details } // namespace details
// //
skipping to change at line 186 skipping to change at line 184
public: public:
typedef T value_type; typedef T value_type;
typedef rowset_iterator<T> iterator; typedef rowset_iterator<T> iterator;
typedef rowset_iterator<T> const_iterator; typedef rowset_iterator<T> const_iterator;
// this is a conversion constructor // this is a conversion constructor
rowset(details::prepare_temp_type const& prep) rowset(details::prepare_temp_type const& prep)
: pimpl_(new details::rowset_impl<T>(prep)) : pimpl_(new details::rowset_impl<T>(prep))
{ {
assert(0 != pimpl_);
} }
rowset(rowset const & other) rowset(rowset const & other)
: pimpl_(other.pimpl_) : pimpl_(other.pimpl_)
{ {
assert(0 != pimpl_);
pimpl_->incRef(); pimpl_->incRef();
} }
~rowset() ~rowset()
{ {
assert(0 != pimpl_);
pimpl_->decRef(); pimpl_->decRef();
} }
rowset& operator=(rowset const& rhs) rowset& operator=(rowset const& rhs)
{ {
assert(0 != pimpl_);
assert(0 != rhs.pimpl_);
if (&rhs != this) if (&rhs != this)
{ {
rhs.pimpl_->incRef(); rhs.pimpl_->incRef();
pimpl_->decRef(); pimpl_->decRef();
pimpl_ = rhs.pimpl_; pimpl_ = rhs.pimpl_;
} }
return *this; return *this;
} }
const_iterator begin() const const_iterator begin() const
{ {
assert(0 != pimpl_);
return pimpl_->begin(); return pimpl_->begin();
} }
const_iterator end() const const_iterator end() const
{ {
assert(0 != pimpl_);
return pimpl_->end(); return pimpl_->end();
} }
private: private:
// Pointer to implementation - the body // Pointer to implementation - the body
details::rowset_impl<T>* pimpl_; details::rowset_impl<T>* pimpl_;
}; // class rowset }; // class rowset
 End of changes. 11 change blocks. 
20 lines changed or deleted 6 lines changed or added


 session.h   session.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_SESSION_H_INCLUDED #ifndef SOCI_SESSION_H_INCLUDED
#define SOCI_SESSION_H_INCLUDED #define SOCI_SESSION_H_INCLUDED
#include "once-temp-type.h" #include "soci/once-temp-type.h"
#include "query_transformation.h" #include "soci/query_transformation.h"
#include "connection-parameters.h" #include "soci/connection-parameters.h"
// std // std
#include <cstddef> #include <cstddef>
#include <memory> #include <memory>
#include <ostream> #include <ostream>
#include <sstream> #include <sstream>
#include <string> #include <string>
namespace soci namespace soci
{ {
skipping to change at line 43 skipping to change at line 43
class blob_backend; class blob_backend;
} // namespace details } // namespace details
class connection_pool; class connection_pool;
class SOCI_DECL session class SOCI_DECL session
{ {
private: private:
#ifdef SOCI_CXX_C11
void set_query_transformation_(std::unique_ptr<details::query_transform
ation_function> & qtf);
#else
void set_query_transformation_(std::auto_ptr<details::query_transformat ion_function> qtf); void set_query_transformation_(std::auto_ptr<details::query_transformat ion_function> qtf);
#endif
public: public:
session(); session();
explicit session(connection_parameters const & parameters); explicit session(connection_parameters const & parameters);
session(backend_factory const & factory, std::string const & connectStr ing); session(backend_factory const & factory, std::string const & connectStr ing);
session(std::string const & backendName, std::string const & connectStr ing); session(std::string const & backendName, std::string const & connectStr ing);
explicit session(std::string const & connectString); explicit session(std::string const & connectString);
explicit session(connection_pool & pool); explicit session(connection_pool & pool);
~session(); ~session();
skipping to change at line 80 skipping to change at line 84
// even more sugar // even more sugar
template <typename T> template <typename T>
details::once_temp_type operator<<(T const & t) { return once << t; } details::once_temp_type operator<<(T const & t) { return once << t; }
std::ostringstream & get_query_stream(); std::ostringstream & get_query_stream();
std::string get_query() const; std::string get_query() const;
template <typename T> template <typename T>
void set_query_transformation(T callback) void set_query_transformation(T callback)
{ {
#ifdef SOCI_CXX_C11
std::unique_ptr<details::query_transformation_function> qtf(new det
ails::query_transformation<T>(callback));
#else
std::auto_ptr<details::query_transformation_function> qtf(new detai ls::query_transformation<T>(callback)); std::auto_ptr<details::query_transformation_function> qtf(new detai ls::query_transformation<T>(callback));
#endif
set_query_transformation_(qtf); set_query_transformation_(qtf);
}
assert(qtf.get() == NULL);
}
// support for basic logging // support for basic logging
void set_log_stream(std::ostream * s); void set_log_stream(std::ostream * s);
std::ostream * get_log_stream() const; std::ostream * get_log_stream() const;
void log_query(std::string const & query); void log_query(std::string const & query);
std::string get_last_query() const; std::string get_last_query() const;
void set_got_data(bool gotData); void set_got_data(bool gotData);
bool got_data() const; bool got_data() const;
 End of changes. 6 change blocks. 
6 lines changed or deleted 15 lines changed or added


 soci-backend.h   soci-backend.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_BACKEND_H_INCLUDED #ifndef SOCI_BACKEND_H_INCLUDED
#define SOCI_BACKEND_H_INCLUDED #define SOCI_BACKEND_H_INCLUDED
#include "soci-config.h" #include "soci/soci-config.h"
#include "error.h" #include "soci/error.h"
// std // std
#include <cstddef> #include <cstddef>
#include <map> #include <map>
#include <string> #include <string>
namespace soci namespace soci
{ {
// data types, as seen by the user // data types, as seen by the user
enum data_type enum data_type
skipping to change at line 173 skipping to change at line 173
ef_success, ef_success,
ef_no_data ef_no_data
}; };
virtual exec_fetch_result execute(int number) = 0; virtual exec_fetch_result execute(int number) = 0;
virtual exec_fetch_result fetch(int number) = 0; virtual exec_fetch_result fetch(int number) = 0;
virtual long long get_affected_rows() = 0; virtual long long get_affected_rows() = 0;
virtual int get_number_of_rows() = 0; virtual int get_number_of_rows() = 0;
virtual std::string get_parameter_name(int index) const = 0;
virtual std::string rewrite_for_procedure_call(std::string const& query ) = 0; virtual std::string rewrite_for_procedure_call(std::string const& query ) = 0;
virtual int prepare_for_describe() = 0; virtual int prepare_for_describe() = 0;
virtual void describe_column(int colNum, data_type& dtype, virtual void describe_column(int colNum, data_type& dtype,
std::string& column_name) = 0; std::string& column_name) = 0;
virtual standard_into_type_backend* make_into_type_backend() = 0; virtual standard_into_type_backend* make_into_type_backend() = 0;
virtual standard_use_type_backend* make_use_type_backend() = 0; virtual standard_use_type_backend* make_use_type_backend() = 0;
virtual vector_into_type_backend* make_vector_into_type_backend() = 0; virtual vector_into_type_backend* make_vector_into_type_backend() = 0;
virtual vector_use_type_backend* make_vector_use_type_backend() = 0; virtual vector_use_type_backend* make_vector_use_type_backend() = 0;
 End of changes. 2 change blocks. 
2 lines changed or deleted 4 lines changed or added


 soci-empty.h   soci-empty.h 
skipping to change at line 26 skipping to change at line 26
# define SOCI_EMPTY_DECL __declspec(dllimport) # define SOCI_EMPTY_DECL __declspec(dllimport)
# endif // SOCI_EMPTY_SOURCE # endif // SOCI_EMPTY_SOURCE
# endif // SOCI_DLL # endif // SOCI_DLL
#endif // _WIN32 #endif // _WIN32
// //
// If SOCI_EMPTY_DECL isn't defined yet define it now // If SOCI_EMPTY_DECL isn't defined yet define it now
#ifndef SOCI_EMPTY_DECL #ifndef SOCI_EMPTY_DECL
# define SOCI_EMPTY_DECL # define SOCI_EMPTY_DECL
#endif #endif
#include "soci-backend.h" #include <soci/soci-backend.h>
#include <cstddef> #include <cstddef>
#include <string> #include <string>
namespace soci namespace soci
{ {
struct empty_statement_backend; struct empty_statement_backend;
struct SOCI_EMPTY_DECL empty_standard_into_type_backend : details::standard _into_type_backend struct SOCI_EMPTY_DECL empty_standard_into_type_backend : details::standard _into_type_backend
skipping to change at line 119 skipping to change at line 119
void alloc(); void alloc();
void clean_up(); void clean_up();
void prepare(std::string const& query, details::statement_type eType); void prepare(std::string const& query, details::statement_type eType);
exec_fetch_result execute(int number); exec_fetch_result execute(int number);
exec_fetch_result fetch(int number); exec_fetch_result fetch(int number);
long long get_affected_rows(); long long get_affected_rows();
int get_number_of_rows(); int get_number_of_rows();
std::string get_parameter_name(int index) const;
std::string rewrite_for_procedure_call(std::string const& query); std::string rewrite_for_procedure_call(std::string const& query);
int prepare_for_describe(); int prepare_for_describe();
void describe_column(int colNum, data_type& dtype, std::string& columnN ame); void describe_column(int colNum, data_type& dtype, std::string& columnN ame);
empty_standard_into_type_backend* make_into_type_backend(); empty_standard_into_type_backend* make_into_type_backend();
empty_standard_use_type_backend* make_use_type_backend(); empty_standard_use_type_backend* make_use_type_backend();
empty_vector_into_type_backend* make_vector_into_type_backend(); empty_vector_into_type_backend* make_vector_into_type_backend();
empty_vector_use_type_backend* make_vector_use_type_backend(); empty_vector_use_type_backend* make_vector_use_type_backend();
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 soci-mysql.h   soci-mysql.h 
skipping to change at line 27 skipping to change at line 27
# define SOCI_MYSQL_DECL __declspec(dllimport) # define SOCI_MYSQL_DECL __declspec(dllimport)
# endif // SOCI_DLL # endif // SOCI_DLL
# endif // SOCI_MYSQL_SOURCE # endif // SOCI_MYSQL_SOURCE
#endif // _WIN32 #endif // _WIN32
// //
// If SOCI_MYSQL_DECL isn't defined yet define it now // If SOCI_MYSQL_DECL isn't defined yet define it now
#ifndef SOCI_MYSQL_DECL #ifndef SOCI_MYSQL_DECL
# define SOCI_MYSQL_DECL # define SOCI_MYSQL_DECL
#endif #endif
#include "soci-backend.h" #include <soci/soci-backend.h>
#ifdef _WIN32 #ifdef _WIN32
#include <winsock.h> // SOCKET #include <winsock.h> // SOCKET
#endif // _WIN32 #endif // _WIN32
#include <mysql.h> // MySQL Client #include <mysql.h> // MySQL Client
#include <vector> #include <vector>
namespace soci namespace soci
{ {
class mysql_soci_error : public soci_error class mysql_soci_error : public soci_error
skipping to change at line 155 skipping to change at line 155
virtual void alloc(); virtual void alloc();
virtual void clean_up(); virtual void clean_up();
virtual void prepare(std::string const &query, virtual void prepare(std::string const &query,
details::statement_type eType); details::statement_type eType);
virtual exec_fetch_result execute(int number); virtual exec_fetch_result execute(int number);
virtual exec_fetch_result fetch(int number); virtual exec_fetch_result fetch(int number);
virtual long long get_affected_rows(); virtual long long get_affected_rows();
virtual int get_number_of_rows(); virtual int get_number_of_rows();
virtual std::string get_parameter_name(int index) const;
virtual std::string rewrite_for_procedure_call(std::string const &query ); virtual std::string rewrite_for_procedure_call(std::string const &query );
virtual int prepare_for_describe(); virtual int prepare_for_describe();
virtual void describe_column(int colNum, data_type &dtype, virtual void describe_column(int colNum, data_type &dtype,
std::string &columnName); std::string &columnName);
virtual mysql_standard_into_type_backend * make_into_type_backend(); virtual mysql_standard_into_type_backend * make_into_type_backend();
virtual mysql_standard_use_type_backend * make_use_type_backend(); virtual mysql_standard_use_type_backend * make_use_type_backend();
virtual mysql_vector_into_type_backend * make_vector_into_type_backend( ); virtual mysql_vector_into_type_backend * make_vector_into_type_backend( );
skipping to change at line 240 skipping to change at line 241
struct mysql_session_backend : details::session_backend struct mysql_session_backend : details::session_backend
{ {
mysql_session_backend(connection_parameters const & parameters); mysql_session_backend(connection_parameters const & parameters);
~mysql_session_backend(); ~mysql_session_backend();
virtual void begin(); virtual void begin();
virtual void commit(); virtual void commit();
virtual void rollback(); virtual void rollback();
virtual bool get_last_insert_id(session&, std::string const&, long&);
virtual std::string get_backend_name() const { return "mysql"; } virtual std::string get_backend_name() const { return "mysql"; }
void clean_up(); void clean_up();
virtual mysql_statement_backend * make_statement_backend(); virtual mysql_statement_backend * make_statement_backend();
virtual mysql_rowid_backend * make_rowid_backend(); virtual mysql_rowid_backend * make_rowid_backend();
virtual mysql_blob_backend * make_blob_backend(); virtual mysql_blob_backend * make_blob_backend();
MYSQL *conn_; MYSQL *conn_;
}; };
 End of changes. 3 change blocks. 
1 lines changed or deleted 4 lines changed or added


 soci-odbc.h   soci-odbc.h 
skipping to change at line 27 skipping to change at line 27
# endif // SOCI_ODBC_SOURCE # endif // SOCI_ODBC_SOURCE
# endif // SOCI_DLL # endif // SOCI_DLL
#endif // _WIN32 #endif // _WIN32
// //
// If SOCI_ODBC_DECL isn't defined yet define it now // If SOCI_ODBC_DECL isn't defined yet define it now
#ifndef SOCI_ODBC_DECL #ifndef SOCI_ODBC_DECL
# define SOCI_ODBC_DECL # define SOCI_ODBC_DECL
#endif #endif
#include <vector> #include <vector>
#include <soci/soci-backend.h>
#include <sstream> #include <sstream>
#include <soci-backend.h>
#if defined(_MSC_VER) || defined(__MINGW32__) #if defined(_MSC_VER) || defined(__MINGW32__)
#include <soci-platform.h> #include "soci/soci-platform.h"
#include <windows.h> #include <windows.h>
#endif #endif
#include <sqlext.h> // ODBC #include <sqlext.h> // ODBC
#include <string.h> // strcpy() #include <string.h> // strcpy()
namespace soci namespace soci
{ {
// TODO: Do we want to make it a part of public interface? --mloskot
namespace details namespace details
{ {
// TODO: Do we want to make it a part of public interface? --mloskot
std::size_t const odbc_max_buffer_length = 100 * 1024 * 1024; std::size_t const odbc_max_buffer_length = 100 * 1024 * 1024;
// This cast is only used to avoid compiler warnings when passing strin
gs
// to ODBC functions, the returned string may *not* be really modified.
inline SQLCHAR* sqlchar_cast(std::string const& s)
{
return reinterpret_cast<SQLCHAR*>(const_cast<char*>(s.c_str()));
}
} }
// Option allowing to specify the "driver completion" parameter of // Option allowing to specify the "driver completion" parameter of
// SQLDriverConnect(). Its possible values are the same as the allowed valu es // SQLDriverConnect(). Its possible values are the same as the allowed valu es
// for this parameter in the official ODBC, i.e. one of SQL_DRIVER_XXX (in // for this parameter in the official ODBC, i.e. one of SQL_DRIVER_XXX (in
// string form as all options are strings currently). // string form as all options are strings currently).
extern SOCI_ODBC_DECL char const * odbc_option_driver_complete; extern SOCI_ODBC_DECL char const * odbc_option_driver_complete;
struct odbc_statement_backend; struct odbc_statement_backend;
skipping to change at line 214 skipping to change at line 221
virtual void alloc(); virtual void alloc();
virtual void clean_up(); virtual void clean_up();
virtual void prepare(std::string const &query, virtual void prepare(std::string const &query,
details::statement_type eType); details::statement_type eType);
virtual exec_fetch_result execute(int number); virtual exec_fetch_result execute(int number);
virtual exec_fetch_result fetch(int number); virtual exec_fetch_result fetch(int number);
virtual long long get_affected_rows(); virtual long long get_affected_rows();
virtual int get_number_of_rows(); virtual int get_number_of_rows();
virtual std::string get_parameter_name(int index) const;
virtual std::string rewrite_for_procedure_call(std::string const &query ); virtual std::string rewrite_for_procedure_call(std::string const &query );
virtual int prepare_for_describe(); virtual int prepare_for_describe();
virtual void describe_column(int colNum, data_type &dtype, virtual void describe_column(int colNum, data_type &dtype,
std::string &columnName); std::string &columnName);
// helper for defining into vector<string> // helper for defining into vector<string>
std::size_t column_size(int position); std::size_t column_size(int position);
skipping to change at line 284 skipping to change at line 292
virtual void commit(); virtual void commit();
virtual void rollback(); virtual void rollback();
virtual bool get_next_sequence_value(session & s, virtual bool get_next_sequence_value(session & s,
std::string const & sequence, long & value); std::string const & sequence, long & value);
virtual bool get_last_insert_id(session & s, virtual bool get_last_insert_id(session & s,
std::string const & table, long & value); std::string const & table, long & value);
virtual std::string get_backend_name() const { return "odbc"; } virtual std::string get_backend_name() const { return "odbc"; }
void configure_connection();
void reset_transaction(); void reset_transaction();
void clean_up(); void clean_up();
virtual odbc_statement_backend * make_statement_backend(); virtual odbc_statement_backend * make_statement_backend();
virtual odbc_rowid_backend * make_rowid_backend(); virtual odbc_rowid_backend * make_rowid_backend();
virtual odbc_blob_backend * make_blob_backend(); virtual odbc_blob_backend * make_blob_backend();
enum database_product enum database_product
{ {
 End of changes. 8 change blocks. 
3 lines changed or deleted 13 lines changed or added


 soci-postgresql.h   soci-postgresql.h 
skipping to change at line 27 skipping to change at line 27
# define SOCI_POSTGRESQL_DECL __declspec(dllimport) # define SOCI_POSTGRESQL_DECL __declspec(dllimport)
# endif // SOCI_POSTGRESQL_SOURCE # endif // SOCI_POSTGRESQL_SOURCE
# endif // SOCI_DLL # endif // SOCI_DLL
#endif // _WIN32 #endif // _WIN32
// //
// If SOCI_POSTGRESQL_DECL isn't defined yet define it now // If SOCI_POSTGRESQL_DECL isn't defined yet define it now
#ifndef SOCI_POSTGRESQL_DECL #ifndef SOCI_POSTGRESQL_DECL
# define SOCI_POSTGRESQL_DECL # define SOCI_POSTGRESQL_DECL
#endif #endif
#include <soci-backend.h> #include <soci/soci-backend.h>
#include <libpq-fe.h> #include <libpq-fe.h>
#include <vector> #include <vector>
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(disable:4512 4511) #pragma warning(disable:4512 4511)
#endif #endif
namespace soci namespace soci
{ {
skipping to change at line 234 skipping to change at line 234
virtual void alloc(); virtual void alloc();
virtual void clean_up(); virtual void clean_up();
virtual void prepare(std::string const & query, virtual void prepare(std::string const & query,
details::statement_type stType); details::statement_type stType);
virtual exec_fetch_result execute(int number); virtual exec_fetch_result execute(int number);
virtual exec_fetch_result fetch(int number); virtual exec_fetch_result fetch(int number);
virtual long long get_affected_rows(); virtual long long get_affected_rows();
virtual int get_number_of_rows(); virtual int get_number_of_rows();
virtual std::string get_parameter_name(int index) const;
virtual std::string rewrite_for_procedure_call(std::string const & quer y); virtual std::string rewrite_for_procedure_call(std::string const & quer y);
virtual int prepare_for_describe(); virtual int prepare_for_describe();
virtual void describe_column(int colNum, data_type & dtype, virtual void describe_column(int colNum, data_type & dtype,
std::string & columnName); std::string & columnName);
virtual postgresql_standard_into_type_backend * make_into_type_backend( ); virtual postgresql_standard_into_type_backend * make_into_type_backend( );
virtual postgresql_standard_use_type_backend * make_use_type_backend(); virtual postgresql_standard_use_type_backend * make_use_type_backend();
virtual postgresql_vector_into_type_backend * make_vector_into_type_bac kend(); virtual postgresql_vector_into_type_backend * make_vector_into_type_bac kend();
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 soci-simple.h   soci-simple.h 
// //
// Copyright (C) 2008 Maciej Sobczak // Copyright (C) 2008 Maciej Sobczak
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_SIMPLE_H_INCLUDED #ifndef SOCI_SIMPLE_H_INCLUDED
#define SOCI_SIMPLE_H_INCLUDED #define SOCI_SIMPLE_H_INCLUDED
#include "soci-config.h" #include "soci/soci-config.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif // __cplusplus #endif // __cplusplus
// session // session
typedef void * session_handle; typedef void * session_handle;
SOCI_DECL session_handle soci_create_session(char const * connectionString) ; SOCI_DECL session_handle soci_create_session(char const * connectionString) ;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 soci-sqlite3.h   soci-sqlite3.h 
skipping to change at line 28 skipping to change at line 28
# endif // SOCI_DLL # endif // SOCI_DLL
#endif // _WIN32 #endif // _WIN32
// //
// If SOCI_SQLITE3_DECL isn't defined yet define it now // If SOCI_SQLITE3_DECL isn't defined yet define it now
#ifndef SOCI_SQLITE3_DECL #ifndef SOCI_SQLITE3_DECL
# define SOCI_SQLITE3_DECL # define SOCI_SQLITE3_DECL
#endif #endif
#include <cstdarg> #include <cstdarg>
#include <vector> #include <vector>
#include "soci-backend.h" #include <soci/soci-backend.h>
// Disable flood of nonsense warnings generated for SQLite // Disable flood of nonsense warnings generated for SQLite
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(push) #pragma warning(push)
#pragma warning(disable:4510 4512 4610) #pragma warning(disable:4510 4512 4610)
#endif #endif
namespace sqlite_api namespace sqlite_api
{ {
skipping to change at line 189 skipping to change at line 189
virtual void clean_up(); virtual void clean_up();
virtual void prepare(std::string const &query, virtual void prepare(std::string const &query,
details::statement_type eType); details::statement_type eType);
void reset_if_needed(); void reset_if_needed();
virtual exec_fetch_result execute(int number); virtual exec_fetch_result execute(int number);
virtual exec_fetch_result fetch(int number); virtual exec_fetch_result fetch(int number);
virtual long long get_affected_rows(); virtual long long get_affected_rows();
virtual int get_number_of_rows(); virtual int get_number_of_rows();
virtual std::string get_parameter_name(int index) const;
virtual std::string rewrite_for_procedure_call(std::string const &query ); virtual std::string rewrite_for_procedure_call(std::string const &query );
virtual int prepare_for_describe(); virtual int prepare_for_describe();
virtual void describe_column(int colNum, data_type &dtype, virtual void describe_column(int colNum, data_type &dtype,
std::string &columnName); std::string &columnName);
virtual sqlite3_standard_into_type_backend * make_into_type_backend(); virtual sqlite3_standard_into_type_backend * make_into_type_backend();
virtual sqlite3_standard_use_type_backend * make_use_type_backend(); virtual sqlite3_standard_use_type_backend * make_use_type_backend();
virtual sqlite3_vector_into_type_backend * make_vector_into_type_backen d(); virtual sqlite3_vector_into_type_backend * make_vector_into_type_backen d();
skipping to change at line 259 skipping to change at line 260
struct sqlite3_session_backend : details::session_backend struct sqlite3_session_backend : details::session_backend
{ {
sqlite3_session_backend(connection_parameters const & parameters); sqlite3_session_backend(connection_parameters const & parameters);
~sqlite3_session_backend(); ~sqlite3_session_backend();
virtual void begin(); virtual void begin();
virtual void commit(); virtual void commit();
virtual void rollback(); virtual void rollback();
virtual bool get_last_insert_id(session&, std::string const&, long&);
virtual std::string get_backend_name() const { return "sqlite3"; } virtual std::string get_backend_name() const { return "sqlite3"; }
void clean_up(); void clean_up();
virtual sqlite3_statement_backend * make_statement_backend(); virtual sqlite3_statement_backend * make_statement_backend();
virtual sqlite3_rowid_backend * make_rowid_backend(); virtual sqlite3_rowid_backend * make_rowid_backend();
virtual sqlite3_blob_backend * make_blob_backend(); virtual sqlite3_blob_backend * make_blob_backend();
sqlite_api::sqlite3 *conn_; sqlite_api::sqlite3 *conn_;
}; };
 End of changes. 3 change blocks. 
1 lines changed or deleted 4 lines changed or added


 soci.h   soci.h 
skipping to change at line 16 skipping to change at line 16
// //
#ifndef SOCI_H_INCLUDED #ifndef SOCI_H_INCLUDED
#define SOCI_H_INCLUDED #define SOCI_H_INCLUDED
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(disable:4251 4512 4511) #pragma warning(disable:4251 4512 4511)
#endif #endif
// namespace soci // namespace soci
#include "backend-loader.h" #include "soci/backend-loader.h"
#include "blob.h" #include "soci/blob.h"
#include "blob-exchange.h" #include "soci/blob-exchange.h"
#include "connection-pool.h" #include "soci/connection-pool.h"
#include "error.h" #include "soci/error.h"
#include "exchange-traits.h" #include "soci/exchange-traits.h"
#include "into.h" #include "soci/into.h"
#include "into-type.h" #include "soci/into-type.h"
#include "once-temp-type.h" #include "soci/once-temp-type.h"
#include "prepare-temp-type.h" #include "soci/prepare-temp-type.h"
#include "procedure.h" #include "soci/procedure.h"
#include "ref-counted-prepare-info.h" #include "soci/ref-counted-prepare-info.h"
#include "ref-counted-statement.h" #include "soci/ref-counted-statement.h"
#include "row.h" #include "soci/row.h"
#include "row-exchange.h" #include "soci/row-exchange.h"
#include "rowid.h" #include "soci/rowid.h"
#include "rowid-exchange.h" #include "soci/rowid-exchange.h"
#include "rowset.h" #include "soci/rowset.h"
#include "session.h" #include "soci/session.h"
#include "soci-backend.h" #include "soci/soci-backend.h"
#include "soci-config.h" #include "soci/soci-config.h"
#include "soci-platform.h" #include "soci/soci-platform.h"
#include "statement.h" #include "soci/statement.h"
#include "transaction.h" #include "soci/transaction.h"
#include "type-conversion.h" #include "soci/type-conversion.h"
#include "type-conversion-traits.h" #include "soci/type-conversion-traits.h"
#include "type-holder.h" #include "soci/type-holder.h"
#include "type-ptr.h" #include "soci/type-ptr.h"
#include "unsigned-types.h" #include "soci/unsigned-types.h"
#include "use.h" #include "soci/use.h"
#include "use-type.h" #include "soci/use-type.h"
#include "values.h" #include "soci/values.h"
#include "values-exchange.h" #include "soci/values-exchange.h"
// namespace boost // namespace boost
#ifdef SOCI_USE_BOOST #ifdef SOCI_USE_BOOST
#include <boost/version.hpp> #include <boost/version.hpp>
#if defined(BOOST_VERSION) && BOOST_VERSION >= 103500 #if defined(BOOST_VERSION) && BOOST_VERSION >= 103500
#include "boost-fusion.h" #include "soci/boost-fusion.h"
#endif // BOOST_VERSION #endif // BOOST_VERSION
#include "boost-optional.h" #include "soci/boost-optional.h"
#include "boost-tuple.h" #include "soci/boost-tuple.h"
#include "boost-gregorian-date.h" #include "soci/boost-gregorian-date.h"
#endif // SOCI_USE_BOOST #endif // SOCI_USE_BOOST
#endif // SOCI_H_INCLUDED #endif // SOCI_H_INCLUDED
 End of changes. 3 change blocks. 
37 lines changed or deleted 37 lines changed or added


 statement.h   statement.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_STATEMENT_H_INCLUDED #ifndef SOCI_STATEMENT_H_INCLUDED
#define SOCI_STATEMENT_H_INCLUDED #define SOCI_STATEMENT_H_INCLUDED
#include "bind-values.h" #include "soci/bind-values.h"
#include "into-type.h" #include "soci/into-type.h"
#include "into.h" #include "soci/into.h"
#include "use-type.h" #include "soci/noreturn.h"
#include "use.h" #include "soci/use-type.h"
#include "soci-backend.h" #include "soci/use.h"
#include "row.h" #include "soci/soci-backend.h"
#include "soci/row.h"
// std // std
#include <cstddef> #include <cstddef>
#include <string> #include <string>
#include <map>
#include <vector> #include <vector>
namespace soci namespace soci
{ {
class session; class session;
class values; class values;
namespace details namespace details
{ {
skipping to change at line 95 skipping to change at line 95
session & session_; session & session_;
std::string rewrite_for_procedure_call(std::string const & query); std::string rewrite_for_procedure_call(std::string const & query);
protected: protected:
into_type_vector intos_; into_type_vector intos_;
use_type_vector uses_; use_type_vector uses_;
std::vector<indicator *> indicators_; std::vector<indicator *> indicators_;
private: private:
// Call this method from a catch clause (only!) to rethrow the exceptio
n
// after adding the context in which it happened, including the provide
d
// description of the operation that failed, the SQL query and, if
// applicable, its parameters.
SOCI_NORETURN rethrow_current_exception_with_context(char const* operat
ion);
int refCount_; int refCount_;
row * row_; row * row_;
std::size_t fetchSize_; std::size_t fetchSize_;
std::size_t initialFetchSize_; std::size_t initialFetchSize_;
std::string query_; std::string query_;
std::map<std::string, use_type_base *> namedUses_;
into_type_vector intosForRow_; into_type_vector intosForRow_;
int definePositionForRow_; int definePositionForRow_;
template <typename Into> template <typename Into>
void exchange_for_rowset_(Into const &i) void exchange_for_rowset_(Into const &i)
{ {
if (intos_.empty() == false) if (intos_.empty() == false)
{ {
throw soci_error("Explicit into elements not allowed with rowse t."); throw soci_error("Explicit into elements not allowed with rowse t.");
 End of changes. 4 change blocks. 
9 lines changed or deleted 16 lines changed or added


 transaction.h   transaction.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak // Copyright (C) 2004-2008 Maciej Sobczak
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_TRANSACTION_H_INCLUDED #ifndef SOCI_TRANSACTION_H_INCLUDED
#define SOCI_TRANSACTION_H_INCLUDED #define SOCI_TRANSACTION_H_INCLUDED
#include "session.h" #include "soci/session.h"
#include "soci-config.h" #include "soci/soci-config.h"
namespace soci namespace soci
{ {
class SOCI_DECL transaction class SOCI_DECL transaction
{ {
public: public:
explicit transaction(session& sql); explicit transaction(session& sql);
~transaction(); ~transaction();
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 type-conversion-traits.h   type-conversion-traits.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_TYPE_CONVERSION_TRAITS_H_INCLUDED #ifndef SOCI_TYPE_CONVERSION_TRAITS_H_INCLUDED
#define SOCI_TYPE_CONVERSION_TRAITS_H_INCLUDED #define SOCI_TYPE_CONVERSION_TRAITS_H_INCLUDED
#include "soci-backend.h" #include "soci/soci-backend.h"
namespace soci namespace soci
{ {
// default traits class type_conversion, acts as pass through for row::get( ) // default traits class type_conversion, acts as pass through for row::get( )
// when no actual conversion is needed. // when no actual conversion is needed.
template <typename T, typename Enable = void> template <typename T, typename Enable = void>
struct type_conversion struct type_conversion
{ {
typedef T base_type; typedef T base_type;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 type-conversion.h   type-conversion.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_TYPE_CONVERSION_H_INCLUDED #ifndef SOCI_TYPE_CONVERSION_H_INCLUDED
#define SOCI_TYPE_CONVERSION_H_INCLUDED #define SOCI_TYPE_CONVERSION_H_INCLUDED
#include "type-conversion-traits.h" #include "soci/type-conversion-traits.h"
#include "into-type.h" #include "soci/into-type.h"
#include "use-type.h" #include "soci/use-type.h"
// std // std
#include <cassert>
#include <cstddef> #include <cstddef>
#include <string> #include <string>
#include <vector> #include <vector>
namespace soci namespace soci
{ {
namespace details namespace details
{ {
skipping to change at line 51 skipping to change at line 50
{ {
public: public:
typedef typename type_conversion<T>::base_type base_type; typedef typename type_conversion<T>::base_type base_type;
conversion_into_type(T & value) conversion_into_type(T & value)
: into_type<base_type>(details::base_value_holder<T>::val_, ownInd_ ) : into_type<base_type>(details::base_value_holder<T>::val_, ownInd_ )
, value_(value) , value_(value)
, ownInd_() , ownInd_()
, ind_(ownInd_) , ind_(ownInd_)
{ {
assert(ownInd_ == ind_);
} }
conversion_into_type(T & value, indicator & ind) conversion_into_type(T & value, indicator & ind)
: into_type<base_type>(details::base_value_holder<T>::val_, ind) : into_type<base_type>(details::base_value_holder<T>::val_, ind)
, value_(value) , value_(value)
, ownInd_(ind) // unused, just keep the pair of indicator(s) consis tent , ownInd_(ind) // unused, just keep the pair of indicator(s) consis tent
, ind_(ind) , ind_(ind)
{ {
assert(ownInd_ == ind_);
} }
private: private:
void convert_from_base() void convert_from_base()
{ {
type_conversion<T>::from_base( type_conversion<T>::from_base(
details::base_value_holder<T>::val_, ind_, value_); details::base_value_holder<T>::val_, ind_, value_);
} }
T & value_; T & value_;
skipping to change at line 97 skipping to change at line 94
public: public:
typedef typename type_conversion<T>::base_type base_type; typedef typename type_conversion<T>::base_type base_type;
conversion_use_type(T & value, std::string const & name = std::string() ) conversion_use_type(T & value, std::string const & name = std::string() )
: use_type<base_type>(details::base_value_holder<T>::val_, ownInd_, name) : use_type<base_type>(details::base_value_holder<T>::val_, ownInd_, name)
, value_(value) , value_(value)
, ownInd_() , ownInd_()
, ind_(ownInd_) , ind_(ownInd_)
, readOnly_(false) , readOnly_(false)
{ {
assert(ownInd_ == ind_);
// TODO: likely to be removed (SHA: c166625a28f7c907318134f625ff5ac ea7d9a1f8) // TODO: likely to be removed (SHA: c166625a28f7c907318134f625ff5ac ea7d9a1f8)
//convert_to_base(); //convert_to_base();
} }
conversion_use_type(T const & value, std::string const & name = std::st ring()) conversion_use_type(T const & value, std::string const & name = std::st ring())
: use_type<base_type>(details::base_value_holder<T>::val_, ownInd_, name) : use_type<base_type>(details::base_value_holder<T>::val_, ownInd_, name)
, value_(const_cast<T &>(value)) , value_(const_cast<T &>(value))
, ownInd_() , ownInd_()
, ind_(ownInd_) , ind_(ownInd_)
, readOnly_(true) , readOnly_(true)
{ {
assert(ownInd_ == ind_);
// TODO: likely to be removed (SHA: c166625a28f7c907318134f625ff5ac ea7d9a1f8) // TODO: likely to be removed (SHA: c166625a28f7c907318134f625ff5ac ea7d9a1f8)
//convert_to_base(); //convert_to_base();
} }
conversion_use_type(T & value, indicator & ind, conversion_use_type(T & value, indicator & ind,
std::string const & name = std::string()) std::string const & name = std::string())
: use_type<base_type>(details::base_value_holder<T>::val_, ind, nam e) : use_type<base_type>(details::base_value_holder<T>::val_, ind, nam e)
, value_(value) , value_(value)
, ind_(ind) , ind_(ind)
, readOnly_(false) , readOnly_(false)
skipping to change at line 202 skipping to change at line 195
typename type_conversion<T>::base_type typename type_conversion<T>::base_type
> base_type; > base_type;
conversion_into_type(std::vector<T> & value) conversion_into_type(std::vector<T> & value)
: details::base_vector_holder<T>(value.size()) : details::base_vector_holder<T>(value.size())
, into_type<base_type>(details::base_vector_holder<T>::vec_, ownInd _) , into_type<base_type>(details::base_vector_holder<T>::vec_, ownInd _)
, value_(value) , value_(value)
, ownInd_() , ownInd_()
, ind_(ownInd_) , ind_(ownInd_)
{ {
assert(ownInd_ == ind_);
} }
conversion_into_type(std::vector<T> & value, std::vector<indicator> & i nd) conversion_into_type(std::vector<T> & value, std::vector<indicator> & i nd)
: details::base_vector_holder<T>(value.size()) : details::base_vector_holder<T>(value.size())
, into_type<base_type>(details::base_vector_holder<T>::vec_, ind) , into_type<base_type>(details::base_vector_holder<T>::vec_, ind)
, value_(value) , value_(value)
, ind_(ind) , ind_(ind)
{} {}
virtual std::size_t size() const virtual std::size_t size() const
skipping to change at line 273 skipping to change at line 265
conversion_use_type(std::vector<T> & value, conversion_use_type(std::vector<T> & value,
std::string const & name=std::string()) std::string const & name=std::string())
: details::base_vector_holder<T>(value.size()) : details::base_vector_holder<T>(value.size())
, use_type<base_type>( , use_type<base_type>(
details::base_vector_holder<T>::vec_, ownInd_, name) details::base_vector_holder<T>::vec_, ownInd_, name)
, value_(value) , value_(value)
, ownInd_() , ownInd_()
, ind_(ownInd_) , ind_(ownInd_)
{ {
assert(ownInd_ == ind_);
} }
conversion_use_type(std::vector<T> & value, conversion_use_type(std::vector<T> & value,
std::vector<indicator> & ind, std::vector<indicator> & ind,
std::string const & name = std::string()) std::string const & name = std::string())
: details::base_vector_holder<T>(value.size()) : details::base_vector_holder<T>(value.size())
, use_type<base_type>( , use_type<base_type>(
details::base_vector_holder<T>::vec_, ind, name) details::base_vector_holder<T>::vec_, ind, name)
, value_(value) , value_(value)
, ind_(ind) , ind_(ind)
 End of changes. 8 change blocks. 
12 lines changed or deleted 3 lines changed or added


 unsigned-types.h   unsigned-types.h 
// //
// Copyright (C) 2010 Maciej Sobczak // Copyright (C) 2010 Maciej Sobczak
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_UNSIGNED_TYPES_H_INCLUDED #ifndef SOCI_UNSIGNED_TYPES_H_INCLUDED
#define SOCI_UNSIGNED_TYPES_H_INCLUDED #define SOCI_UNSIGNED_TYPES_H_INCLUDED
#include "type-conversion-traits.h" #include "soci/type-conversion-traits.h"
#include <limits> #include <limits>
namespace soci namespace soci
{ {
// simple fall-back for unsigned types // simple fall-back for unsigned types
template <> template <>
struct type_conversion<unsigned char> struct type_conversion<unsigned char>
{ {
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 use-type.h   use-type.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_USE_TYPE_H_INCLUDED #ifndef SOCI_USE_TYPE_H_INCLUDED
#define SOCI_USE_TYPE_H_INCLUDED #define SOCI_USE_TYPE_H_INCLUDED
#include "soci-backend.h" #include "soci/soci-backend.h"
#include "type-ptr.h" #include "soci/type-ptr.h"
#include "exchange-traits.h" #include "soci/exchange-traits.h"
// std // std
#include <cstddef> #include <cstddef>
#include <ostream>
#include <string> #include <string>
#include <vector> #include <vector>
namespace soci { namespace details { namespace soci { namespace details {
class statement_impl; class statement_impl;
// this is intended to be a base class for all classes that deal with // this is intended to be a base class for all classes that deal with
// binding input data (and OUT PL/SQL variables) // binding input data (and OUT PL/SQL variables)
class SOCI_DECL use_type_base class SOCI_DECL use_type_base
{ {
public: public:
virtual ~use_type_base() {} virtual ~use_type_base() {}
virtual void bind(statement_impl & st, int & position) = 0; virtual void bind(statement_impl & st, int & position) = 0;
virtual std::string get_name() const = 0;
virtual void dump_value(std::ostream& os) const = 0;
virtual void pre_use() = 0; virtual void pre_use() = 0;
virtual void post_use(bool gotData) = 0; virtual void post_use(bool gotData) = 0;
virtual void clean_up() = 0; virtual void clean_up() = 0;
virtual std::size_t size() const = 0; // returns the number of element s virtual std::size_t size() const = 0; // returns the number of element s
}; };
typedef type_ptr<use_type_base> use_type_ptr; typedef type_ptr<use_type_base> use_type_ptr;
class SOCI_DECL standard_use_type : public use_type_base class SOCI_DECL standard_use_type : public use_type_base
skipping to change at line 73 skipping to change at line 76
, readOnly_(readOnly) , readOnly_(readOnly)
, name_(name) , name_(name)
, backEnd_(NULL) , backEnd_(NULL)
{ {
// FIXME // FIXME
//convert_to_base(); //convert_to_base();
} }
virtual ~standard_use_type(); virtual ~standard_use_type();
virtual void bind(statement_impl & st, int & position); virtual void bind(statement_impl & st, int & position);
std::string get_name() const { return name_; } virtual std::string get_name() const { return name_; }
virtual void dump_value(std::ostream& os) const;
virtual void * get_data() { return data_; } virtual void * get_data() { return data_; }
// conversion hook (from arbitrary user type to base type) // conversion hook (from arbitrary user type to base type)
virtual void convert_to_base() {} virtual void convert_to_base() {}
virtual void convert_from_base() {} virtual void convert_from_base() {}
protected: protected:
virtual void pre_use(); virtual void pre_use();
private: private:
skipping to change at line 123 skipping to change at line 127
, type_(type) , type_(type)
, ind_(&ind) , ind_(&ind)
, name_(name) , name_(name)
, backEnd_(NULL) , backEnd_(NULL)
{} {}
~vector_use_type(); ~vector_use_type();
private: private:
virtual void bind(statement_impl& st, int & position); virtual void bind(statement_impl& st, int & position);
virtual std::string get_name() const { return name_; }
virtual void dump_value(std::ostream& os) const;
virtual void pre_use(); virtual void pre_use();
virtual void post_use(bool) { /* nothing to do */ } virtual void post_use(bool) { /* nothing to do */ }
virtual void clean_up(); virtual void clean_up();
virtual std::size_t size() const; virtual std::size_t size() const;
void* data_; void* data_;
exchange_type type_; exchange_type type_;
std::vector<indicator> const* ind_; std::vector<indicator> const* ind_;
std::string name_; std::string name_;
 End of changes. 5 change blocks. 
4 lines changed or deleted 10 lines changed or added


 use.h   use.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_USE_H_INCLUDED #ifndef SOCI_USE_H_INCLUDED
#define SOCI_USE_H_INCLUDED #define SOCI_USE_H_INCLUDED
#include "soci-backend.h" #include "soci/use-type.h"
#include "soci/exchange-traits.h"
#include "soci/type-conversion.h"
#include "soci/soci-backend.h"
namespace soci namespace soci
{ {
namespace details namespace details
{ {
template <typename T, typename Indicator> template <typename T, typename Indicator>
struct use_container struct use_container
{ {
use_container(T &_t, Indicator &_ind, const std::string &_name) use_container(T &_t, Indicator &_ind, const std::string &_name)
 End of changes. 1 change blocks. 
1 lines changed or deleted 4 lines changed or added


 values-exchange.h   values-exchange.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_VALUES_EXCHANGE_H_INCLUDED #ifndef SOCI_VALUES_EXCHANGE_H_INCLUDED
#define SOCI_VALUES_EXCHANGE_H_INCLUDED #define SOCI_VALUES_EXCHANGE_H_INCLUDED
#include "values.h" #include "soci/values.h"
#include "into-type.h" #include "soci/into-type.h"
#include "use-type.h" #include "soci/use-type.h"
#include "row-exchange.h" #include "soci/row-exchange.h"
// std // std
#include <cstddef> #include <cstddef>
#include <sstream>
#include <string> #include <string>
#include <vector> #include <vector>
namespace soci namespace soci
{ {
namespace details namespace details
{ {
template <> template <>
skipping to change at line 56 skipping to change at line 57
{} {}
virtual void bind(details::statement_impl & st, int & /*position*/) virtual void bind(details::statement_impl & st, int & /*position*/)
{ {
v_.uppercase_column_names(st.session_.get_uppercase_column_names()) ; v_.uppercase_column_names(st.session_.get_uppercase_column_names()) ;
convert_to_base(); convert_to_base();
st.bind(v_); st.bind(v_);
} }
virtual std::string get_name() const
{
std::ostringstream oss;
oss << "(";
std::size_t const num_columns = v_.get_number_of_columns();
for (std::size_t n = 0; n < num_columns; ++n)
{
if (n != 0)
oss << ", ";
oss << v_.get_properties(n).get_name();
}
oss << ")";
return oss.str();
}
virtual void dump_value(std::ostream& os) const
{
// TODO: Dump all columns.
os << "<value>";
}
virtual void post_use(bool /*gotData*/) virtual void post_use(bool /*gotData*/)
{ {
v_.reset_get_counter(); v_.reset_get_counter();
convert_from_base(); convert_from_base();
} }
virtual void pre_use() {convert_to_base();} virtual void pre_use() {convert_to_base();}
virtual void clean_up() {v_.clean_up();} virtual void clean_up() {v_.clean_up();}
virtual std::size_t size() const { return 1; } virtual std::size_t size() const { return 1; }
 End of changes. 3 change blocks. 
4 lines changed or deleted 31 lines changed or added


 values.h   values.h 
// //
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_VALUES_H_INCLUDED #ifndef SOCI_VALUES_H_INCLUDED
#define SOCI_VALUES_H_INCLUDED #define SOCI_VALUES_H_INCLUDED
#include "statement.h" #include "soci/statement.h"
#include "into-type.h" #include "soci/into-type.h"
#include "use-type.h" #include "soci/use-type.h"
// std // std
#include <cstddef> #include <cstddef>
#include <map> #include <map>
#include <sstream> #include <sstream>
#include <string> #include <string>
#include <utility> #include <utility>
#include <vector> #include <vector>
namespace soci namespace soci
{ {
skipping to change at line 233 skipping to change at line 233
{ {
set(value); set(value);
return *this; return *this;
} }
void uppercase_column_names(bool forceToUpper) void uppercase_column_names(bool forceToUpper)
{ {
uppercaseColumnNames_ = forceToUpper; uppercaseColumnNames_ = forceToUpper;
} }
std::size_t get_number_of_columns() const
{
return row_ ? row_->size() : 0;
}
column_properties const& get_properties(std::size_t pos) const; column_properties const& get_properties(std::size_t pos) const;
column_properties const& get_properties(std::string const &name) const; column_properties const& get_properties(std::string const &name) const;
private: private:
//TODO To make values generally usable outside of type_conversion's, //TODO To make values generally usable outside of type_conversion's,
// these should be reference counted smart pointers // these should be reference counted smart pointers
row * row_; row * row_;
std::vector<details::standard_use_type *> uses_; std::vector<details::standard_use_type *> uses_;
std::map<details::use_type_base *, indicator *> unused_; std::map<details::use_type_base *, indicator *> unused_;
 End of changes. 2 change blocks. 
3 lines changed or deleted 8 lines changed or added


 version.h   version.h 
skipping to change at line 13 skipping to change at line 13
// //
// Copyright (C) 2011 Mateusz Loskot <mateusz@loskot.net> // Copyright (C) 2011 Mateusz Loskot <mateusz@loskot.net>
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// //
#ifndef SOCI_VERSION_HPP #ifndef SOCI_VERSION_HPP
#define SOCI_VERSION_HPP #define SOCI_VERSION_HPP
// When updating the version here, don't forget to update it in CMakeLists.
txt!
// //
// Caution, this is the only SOCI header that is guarenteed // Caution, this is the only SOCI header that is guarenteed
// to change with every SOCI release, including this header // to change with every SOCI release, including this header
// will cause a recompile every time a new SOCI version is // will cause a recompile every time a new SOCI version is
// released. // released.
// //
// SOCI_VERSION % 100 is the patch level // SOCI_VERSION % 100 is the patch level
// SOCI_VERSION / 100 % 1000 is the minor version // SOCI_VERSION / 100 % 1000 is the minor version
// SOCI_VERSION / 100000 is the major version // SOCI_VERSION / 100000 is the major version
#define SOCI_VERSION 300203 #define SOCI_VERSION 400000
// //
// SOCI_LIB_VERSION must be defined to be the same as SOCI_VERSION // SOCI_LIB_VERSION must be defined to be the same as SOCI_VERSION
// but as a *string* in the form "x_y[_z]" where x is the major version // but as a *string* in the form "x_y[_z]" where x is the major version
// number, y is the minor version number, and z is the patch level if not 0. // number, y is the minor version number, and z is the patch level if not 0.
#define SOCI_LIB_VERSION "3_2_3" #define SOCI_LIB_VERSION "4_0_0"
#endif // SOCI_VERSION_HPP #endif // SOCI_VERSION_HPP
 End of changes. 3 change blocks. 
2 lines changed or deleted 5 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/