// file : odb/sqlite/connection.ixx // copyright : Copyright (c) 2005-2017 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file namespace odb { namespace sqlite { // active_objects // inline void active_object:: list_add () { next_ = conn_.active_objects_; conn_.active_objects_ = this; if (next_ != 0) next_->prev_ = this; } inline void active_object:: list_remove () { (prev_ == 0 ? conn_.active_objects_ : prev_->next_) = next_; if (next_ != 0) next_->prev_ = prev_; prev_ = 0; next_ = this; } // connection // inline database& connection:: database () { return static_cast (factory_).database (); } template inline prepared_query connection:: prepare_query (const char* n, const char* q) { return prepare_query (n, query (q)); } template inline prepared_query connection:: prepare_query (const char* n, const std::string& q) { return prepare_query (n, query (q)); } template inline prepared_query connection:: prepare_query (const char* n, const sqlite::query_base& q) { return query_::call (*this, n, q); } template inline prepared_query connection:: prepare_query (const char* n, const odb::query_base& q) { // Translate to native query. // return prepare_query (n, sqlite::query_base (q)); } } }