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

namespace odb
{
  // pkg_repository_auth
  //

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

  inline
  void access::object_traits< ::bpkg::pkg_repository_auth >::
  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< ::bpkg::pkg_repository_auth >::
  callback (database& db, const object_type& x, callback_event e)
  {
    ODB_POTENTIALLY_UNUSED (db);
    ODB_POTENTIALLY_UNUSED (x);
    ODB_POTENTIALLY_UNUSED (e);
  }

  // pkg_repository_auth_count
  //

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

  // pkg_repository_metadata
  //

  inline
  access::object_traits< ::bpkg::pkg_repository_metadata >::id_type
  access::object_traits< ::bpkg::pkg_repository_metadata >::
  id (const object_type& o)
  {
    return o.url;
  }

  inline
  void access::object_traits< ::bpkg::pkg_repository_metadata >::
  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< ::bpkg::pkg_repository_metadata >::
  callback (database& db, const object_type& x, callback_event e)
  {
    ODB_POTENTIALLY_UNUSED (db);
    ODB_POTENTIALLY_UNUSED (x);
    ODB_POTENTIALLY_UNUSED (e);
  }

  // pkg_repository_package
  //

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

  inline
  void access::object_traits< ::bpkg::pkg_repository_package >::
  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< ::bpkg::pkg_repository_package >::
  callback (database& db, const object_type& x, callback_event e)
  {
    ODB_POTENTIALLY_UNUSED (db);
    ODB_POTENTIALLY_UNUSED (x);
    ODB_POTENTIALLY_UNUSED (e);
  }

  // git_repository_state
  //

  inline
  access::object_traits< ::bpkg::git_repository_state >::id_type
  access::object_traits< ::bpkg::git_repository_state >::
  id (const object_type& o)
  {
    return o.url;
  }

  inline
  void access::object_traits< ::bpkg::git_repository_state >::
  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< ::bpkg::git_repository_state >::
  callback (database& db, const object_type& x, callback_event e)
  {
    ODB_POTENTIALLY_UNUSED (db);
    ODB_POTENTIALLY_UNUSED (x);
    ODB_POTENTIALLY_UNUSED (e);
  }

  // shared_source_directory
  //

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

  inline
  void access::object_traits< ::bpkg::shared_source_directory >::
  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< ::bpkg::shared_source_directory >::
  callback (database& db, const object_type& x, callback_event e)
  {
    ODB_POTENTIALLY_UNUSED (db);
    ODB_POTENTIALLY_UNUSED (x);
    ODB_POTENTIALLY_UNUSED (e);
  }
}

#include <odb/schema-version.hxx>

namespace odb
{
  // pkg_repository_auth
  //

  inline
  void access::object_traits_impl< ::bpkg::pkg_repository_auth, 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);
  }

  inline
  void access::object_traits_impl< ::bpkg::pkg_repository_auth, id_sqlite >::
  load_ (statements_type& sts,
         object_type& obj,
         bool)
  {
    ODB_POTENTIALLY_UNUSED (sts);
    ODB_POTENTIALLY_UNUSED (obj);
  }

  // pkg_repository_auth_count
  //

  // pkg_repository_metadata
  //

  inline
  void access::object_traits_impl< ::bpkg::pkg_repository_metadata, 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);
  }

  inline
  void access::object_traits_impl< ::bpkg::pkg_repository_metadata, id_sqlite >::
  load_ (statements_type& sts,
         object_type& obj,
         bool)
  {
    ODB_POTENTIALLY_UNUSED (sts);
    ODB_POTENTIALLY_UNUSED (obj);
  }

  // pkg_repository_package
  //

  inline
  void access::object_traits_impl< ::bpkg::pkg_repository_package, 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);
  }

  inline
  void access::object_traits_impl< ::bpkg::pkg_repository_package, id_sqlite >::
  load_ (statements_type& sts,
         object_type& obj,
         bool)
  {
    ODB_POTENTIALLY_UNUSED (sts);
    ODB_POTENTIALLY_UNUSED (obj);
  }

  // git_repository_state
  //

  inline
  void access::object_traits_impl< ::bpkg::git_repository_state, 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);
  }

  inline
  void access::object_traits_impl< ::bpkg::git_repository_state, id_sqlite >::
  load_ (statements_type& sts,
         object_type& obj,
         bool)
  {
    ODB_POTENTIALLY_UNUSED (sts);
    ODB_POTENTIALLY_UNUSED (obj);
  }

  // shared_source_directory
  //

  inline
  void access::object_traits_impl< ::bpkg::shared_source_directory, 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);
  }
}

