// -*- C++ -*-
//
// This file was generated by ODB, object-relational mapping (ORM)
// compiler for C++.
//

namespace odb
{
  // configuration
  //

  inline
  access::object_traits< ::bdep::configuration >::id_type
  access::object_traits< ::bdep::configuration >::
  id (const object_type& o)
  {
    return o.id;
  }

  inline
  void access::object_traits< ::bdep::configuration >::
  callback (database& db, object_type& x, callback_event e)
  {
    ODB_POTENTIALLY_UNUSED (db);
    ODB_POTENTIALLY_UNUSED (x);
    ODB_POTENTIALLY_UNUSED (e);
  }

  inline
  void access::object_traits< ::bdep::configuration >::
  callback (database& db, const object_type& x, callback_event e)
  {
    ODB_POTENTIALLY_UNUSED (db);
    ODB_POTENTIALLY_UNUSED (x);
    ODB_POTENTIALLY_UNUSED (e);
  }

  // configuration_count
  //

  inline
  void access::view_traits< ::bdep::configuration_count >::
  callback (database& db, view_type& x, callback_event e)
  {
    ODB_POTENTIALLY_UNUSED (db);
    ODB_POTENTIALLY_UNUSED (x);
    ODB_POTENTIALLY_UNUSED (e);
  }
}

#include <odb/schema-version.hxx>

namespace odb
{
  // package_state
  //

  inline
  bool access::composite_value_traits< ::bdep::package_state, id_sqlite >::
  get_null (const image_type& i)
  {
    bool r (true);
    r = r && i.name_null;
    return r;
  }

  inline
  void access::composite_value_traits< ::bdep::package_state, id_sqlite >::
  set_null (image_type& i,
            sqlite::statement_kind sk)
  {
    ODB_POTENTIALLY_UNUSED (sk);

    using namespace sqlite;

    i.name_null = true;
  }

  // configuration
  //

  inline
  void access::object_traits_impl< ::bdep::configuration, id_sqlite >::
  erase (database& db, const object_type& obj)
  {
    callback (db, obj, callback_event::pre_erase);
    erase (db, id (obj));
    callback (db, obj, callback_event::post_erase);
  }

  // configuration_count
  //
}

