polymorphic-object-statements.hxx   polymorphic-object-statements.hxx 
skipping to change at line 366 skipping to change at line 366
} }
return *erase_; return *erase_;
} }
// Container statement cache. // Container statement cache.
// //
container_statement_cache_type& container_statement_cache_type&
container_statment_cache () container_statment_cache ()
{ {
return container_statement_cache_; return container_statement_cache_.get (conn_);
} }
public: public:
// select = total - id + base::select // select = total - id + base::select
// insert = total - inverse // insert = total - inverse
// update = total - inverse - id - readonly // update = total - inverse - id - readonly
// //
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 398 skipping to change at line 398
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_;
container_statement_cache_type container_statement_cache_; container_statement_cache_ptr<container_statement_cache_type>
container_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. 2 change blocks. 
2 lines changed or deleted 3 lines changed or added


 polymorphic-object-statements.txx   polymorphic-object-statements.txx 
skipping to change at line 79 skipping to change at line 79
~polymorphic_derived_object_statements () ~polymorphic_derived_object_statements ()
{ {
} }
template <typename T> template <typename T>
polymorphic_derived_object_statements<T>:: polymorphic_derived_object_statements<T>::
polymorphic_derived_object_statements (connection_type& conn) polymorphic_derived_object_statements (connection_type& conn)
: statements_base (conn), : statements_base (conn),
root_statements_ (conn.statement_cache ().find_object<root_type> ()), root_statements_ (conn.statement_cache ().find_object<root_type> ()),
base_statements_ (conn.statement_cache ().find_object<base_type> ()), base_statements_ (conn.statement_cache ().find_object<base_type> ()),
container_statement_cache_ (conn),
insert_image_binding_ (insert_image_bind_, insert_column_count), insert_image_binding_ (insert_image_bind_, insert_column_count),
update_image_binding_ (update_image_bind_, update_image_binding_ (update_image_bind_,
update_column_count + id_column_count) update_column_count + id_column_count)
{ {
image_.base = &base_statements_.image (); image_.base = &base_statements_.image ();
image_.version = 0; image_.version = 0;
for (std::size_t i (0); i < object_traits::depth; ++i) for (std::size_t i (0); i < object_traits::depth; ++i)
select_image_versions_[i] = 0; select_image_versions_[i] = 0;
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 simple-object-statements.hxx   simple-object-statements.hxx 
skipping to change at line 32 skipping to change at line 32
#include <odb/sqlite/binding.hxx> #include <odb/sqlite/binding.hxx>
#include <odb/sqlite/statement.hxx> #include <odb/sqlite/statement.hxx>
#include <odb/sqlite/statements-base.hxx> #include <odb/sqlite/statements-base.hxx>
#include <odb/sqlite/details/export.hxx> #include <odb/sqlite/details/export.hxx>
namespace odb namespace odb
{ {
namespace sqlite namespace sqlite
{ {
// The container_statement_cache class is only defined (and used) in
// the generated source file. However, object_statements may be
// referenced from another source file in the case of a polymorphic
// hierarchy (though in this case the container statement cache is
// not used). As a result, we cannot have a by-value member and
// instead will store a pointer and lazily allocate the cache if
// and when needed. We will also need to store a pointer to the
// deleter function which will be initialized during allocation
// (at that point we know that the cache class is defined).
//
template <typename T>
struct container_statement_cache_ptr
{
typedef sqlite::connection connection_type;
container_statement_cache_ptr (): p_ (0) {}
~container_statement_cache_ptr () {if (p_ != 0) (this->*deleter_) (0)
;}
T&
get (connection_type& c)
{
if (p_ == 0)
allocate (&c);
return *p_;
}
private:
void
allocate (connection_type*);
private:
T* p_;
void (container_statement_cache_ptr::*deleter_) (connection_type*);
};
template <typename T>
void container_statement_cache_ptr<T>::
allocate (connection_type* c)
{
// To reduce object code size, this function acts as both allocator
// and deleter.
//
if (p_ == 0)
{
p_ = new T (*c);
deleter_ = &container_statement_cache_ptr<T>::allocate;
}
else
delete p_;
}
// //
// Implementation for objects with object id. // Implementation for objects with object id.
// //
class LIBODB_SQLITE_EXPORT object_statements_base: public statements_ba se class LIBODB_SQLITE_EXPORT object_statements_base: public statements_ba se
{ {
public: public:
// Locking. // Locking.
// //
void void
skipping to change at line 376 skipping to change at line 428
} }
return *od_.erase_; return *od_.erase_;
} }
// Container statement cache. // Container statement cache.
// //
container_statement_cache_type& container_statement_cache_type&
container_statment_cache () container_statment_cache ()
{ {
return container_statement_cache_; return container_statement_cache_.get (conn_);
} }
public: public:
// select = total // select = total
// insert = total - inverse - managed_optimistic // insert = total - inverse - managed_optimistic
// update = total - inverse - managed_optimistic - id - readonly // update = total - inverse - managed_optimistic - id - readonly
// //
static const std::size_t select_column_count = static const std::size_t select_column_count =
object_traits::column_count; object_traits::column_count;
skipping to change at line 412 skipping to change at line 464
object_statements& operator= (const object_statements&); object_statements& operator= (const object_statements&);
private: private:
void void
load_delayed_ (); load_delayed_ ();
void void
clear_delayed_ (); clear_delayed_ ();
private: private:
container_statement_cache_type container_statement_cache_; container_statement_cache_ptr<container_statement_cache_type>
container_statement_cache_;
image_type image_; image_type image_;
// Select binding. // Select binding.
// //
std::size_t select_image_version_; std::size_t select_image_version_;
binding select_image_binding_; binding select_image_binding_;
bind select_image_bind_[select_column_count]; bind select_image_bind_[select_column_count];
bool select_image_truncated_[select_column_count]; bool select_image_truncated_[select_column_count];
 End of changes. 3 change blocks. 
2 lines changed or deleted 56 lines changed or added


 simple-object-statements.txx   simple-object-statements.txx 
skipping to change at line 45 skipping to change at line 45
template <typename T> template <typename T>
object_statements<T>:: object_statements<T>::
~object_statements () ~object_statements ()
{ {
} }
template <typename T> template <typename T>
object_statements<T>:: object_statements<T>::
object_statements (connection_type& conn) object_statements (connection_type& conn)
: object_statements_base (conn), : object_statements_base (conn),
container_statement_cache_ (conn),
select_image_binding_ (select_image_bind_, select_column_count), select_image_binding_ (select_image_bind_, select_column_count),
insert_image_binding_ (insert_image_bind_, insert_column_count), insert_image_binding_ (insert_image_bind_, insert_column_count),
update_image_binding_ (update_image_bind_, update_image_binding_ (update_image_bind_,
update_column_count + id_column_count + update_column_count + id_column_count +
managed_optimistic_column_count), managed_optimistic_column_count),
id_image_binding_ (update_image_bind_ + update_column_count, id_image_binding_ (update_image_bind_ + update_column_count,
id_column_count), id_column_count),
od_ (update_image_bind_ + update_column_count) od_ (update_image_bind_ + update_column_count)
{ {
image_.version = 0; image_.version = 0;
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 version.hxx   version.hxx 
skipping to change at line 38 skipping to change at line 38
// Check that we have compatible ODB version. // Check that we have compatible ODB version.
// //
#if ODB_VERSION != 20000 #if ODB_VERSION != 20000
# error incompatible odb interface version detected # error incompatible odb interface version detected
#endif #endif
// libodb-sqlite version: odb interface version plus the bugfix // libodb-sqlite version: odb interface version plus the bugfix
// version. // version.
// //
#define LIBODB_SQLITE_VERSION 2000000 #define LIBODB_SQLITE_VERSION 2000100
#define LIBODB_SQLITE_VERSION_STR "2.0.0" #define LIBODB_SQLITE_VERSION_STR "2.0.1"
#include <odb/post.hxx> #include <odb/post.hxx>
#endif // ODB_SQLITE_VERSION_HXX #endif // ODB_SQLITE_VERSION_HXX
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 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/