aboutsummaryrefslogtreecommitdiff
path: root/libbrep/build-odb.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbrep/build-odb.hxx')
-rw-r--r--libbrep/build-odb.hxx2056
1 files changed, 2056 insertions, 0 deletions
diff --git a/libbrep/build-odb.hxx b/libbrep/build-odb.hxx
new file mode 100644
index 0000000..9000a24
--- /dev/null
+++ b/libbrep/build-odb.hxx
@@ -0,0 +1,2056 @@
+// -*- C++ -*-
+//
+// This file was generated by ODB, object-relational mapping (ORM)
+// compiler for C++.
+//
+
+#ifndef LIBBREP_BUILD_ODB_HXX
+#define LIBBREP_BUILD_ODB_HXX
+
+#include <odb/version.hxx>
+
+#if (ODB_VERSION != 20470UL)
+#error ODB runtime version mismatch
+#endif
+
+#include <odb/pre.hxx>
+
+#include <libbrep/build.hxx>
+
+#include <libbrep/build-package-odb.hxx>
+#include <libbrep/common-odb.hxx>
+
+#include <memory>
+#include <cstddef>
+#include <utility>
+
+#include <odb/core.hxx>
+#include <odb/traits.hxx>
+#include <odb/callback.hxx>
+#include <odb/wrapper-traits.hxx>
+#include <odb/pointer-traits.hxx>
+#include <odb/container-traits.hxx>
+#include <odb/session.hxx>
+#include <odb/cache-traits.hxx>
+#include <odb/prepared-query.hxx>
+#include <odb/result.hxx>
+#include <odb/simple-object-result.hxx>
+#include <odb/view-image.hxx>
+#include <odb/view-result.hxx>
+
+#include <odb/details/unused.hxx>
+#include <odb/details/shared-ptr.hxx>
+
+namespace odb
+{
+ // build
+ //
+ template <>
+ struct class_traits< ::brep::build >
+ {
+ static const class_kind kind = class_object;
+ };
+
+ template <>
+ class access::object_traits< ::brep::build >
+ {
+ public:
+ typedef ::brep::build object_type;
+ typedef ::std::shared_ptr< ::brep::build > pointer_type;
+ typedef odb::pointer_traits<pointer_type> pointer_traits;
+
+ static const bool polymorphic = false;
+
+ typedef ::brep::build_id id_type;
+
+ static const bool auto_id = false;
+
+ static const bool abstract = false;
+
+ static id_type
+ id (const object_type&);
+
+ typedef
+ odb::pointer_cache_traits<
+ pointer_type,
+ odb::session >
+ pointer_cache_traits;
+
+ typedef
+ odb::reference_cache_traits<
+ object_type,
+ odb::session >
+ reference_cache_traits;
+
+ static void
+ callback (database&, object_type&, callback_event);
+
+ static void
+ callback (database&, const object_type&, callback_event);
+ };
+
+ // toolchain
+ //
+ template <>
+ struct class_traits< ::brep::toolchain >
+ {
+ static const class_kind kind = class_view;
+ };
+
+ template <>
+ class access::view_traits< ::brep::toolchain >
+ {
+ public:
+ typedef ::brep::toolchain view_type;
+ typedef ::brep::toolchain* pointer_type;
+
+ static void
+ callback (database&, view_type&, callback_event);
+ };
+
+ // package_build
+ //
+ template <>
+ struct class_traits< ::brep::package_build >
+ {
+ static const class_kind kind = class_view;
+ };
+
+ template <>
+ class access::view_traits< ::brep::package_build >
+ {
+ public:
+ typedef ::brep::package_build view_type;
+ typedef ::brep::package_build* pointer_type;
+
+ static void
+ callback (database&, view_type&, callback_event);
+ };
+
+ // package_build_count
+ //
+ template <>
+ struct class_traits< ::brep::package_build_count >
+ {
+ static const class_kind kind = class_view;
+ };
+
+ template <>
+ class access::view_traits< ::brep::package_build_count >
+ {
+ public:
+ typedef ::brep::package_build_count view_type;
+ typedef ::brep::package_build_count* pointer_type;
+
+ static void
+ callback (database&, view_type&, callback_event);
+ };
+
+ // build_delay
+ //
+ template <>
+ struct class_traits< ::brep::build_delay >
+ {
+ static const class_kind kind = class_object;
+ };
+
+ template <>
+ class access::object_traits< ::brep::build_delay >
+ {
+ public:
+ typedef ::brep::build_delay object_type;
+ typedef ::std::shared_ptr< ::brep::build_delay > pointer_type;
+ typedef odb::pointer_traits<pointer_type> pointer_traits;
+
+ static const bool polymorphic = false;
+
+ typedef ::brep::build_id id_type;
+
+ static const bool auto_id = false;
+
+ static const bool abstract = false;
+
+ static id_type
+ id (const object_type&);
+
+ typedef
+ odb::pointer_cache_traits<
+ pointer_type,
+ odb::session >
+ pointer_cache_traits;
+
+ typedef
+ odb::reference_cache_traits<
+ object_type,
+ odb::session >
+ reference_cache_traits;
+
+ static void
+ callback (database&, object_type&, callback_event);
+
+ static void
+ callback (database&, const object_type&, callback_event);
+ };
+}
+
+#include <odb/details/buffer.hxx>
+
+#include <odb/pgsql/version.hxx>
+#include <odb/pgsql/forward.hxx>
+#include <odb/pgsql/binding.hxx>
+#include <odb/pgsql/pgsql-types.hxx>
+#include <odb/pgsql/query.hxx>
+
+namespace odb
+{
+ // operation_result
+ //
+ template <>
+ class access::composite_value_traits< ::bbot::operation_result, id_pgsql >
+ {
+ public:
+ typedef ::bbot::operation_result value_type;
+
+ struct image_type
+ {
+ // operation
+ //
+ details::buffer operation_value;
+ std::size_t operation_size;
+ bool operation_null;
+
+ // status
+ //
+ details::buffer status_value;
+ std::size_t status_size;
+ bool status_null;
+
+ // log
+ //
+ details::buffer log_value;
+ std::size_t log_size;
+ bool log_null;
+ };
+
+ static bool
+ grow (image_type&,
+ bool*);
+
+ static void
+ bind (pgsql::bind*,
+ image_type&,
+ pgsql::statement_kind);
+
+ static bool
+ init (image_type&,
+ const value_type&,
+ pgsql::statement_kind);
+
+ static void
+ init (value_type&,
+ const image_type&,
+ database*);
+
+ static bool
+ get_null (const image_type&);
+
+ static void
+ set_null (image_type&,
+ pgsql::statement_kind);
+
+ static const std::size_t column_count = 3UL;
+ };
+
+ // build_id
+ //
+ template <>
+ class access::composite_value_traits< ::brep::build_id, id_pgsql >
+ {
+ public:
+ typedef ::brep::build_id value_type;
+
+ struct image_type
+ {
+ // package
+ //
+ composite_value_traits< ::brep::package_id, id_pgsql >::image_type package_value;
+
+ // configuration
+ //
+ details::buffer configuration_value;
+ std::size_t configuration_size;
+ bool configuration_null;
+
+ // toolchain_name
+ //
+ details::buffer toolchain_name_value;
+ std::size_t toolchain_name_size;
+ bool toolchain_name_null;
+
+ // toolchain_version
+ //
+ composite_value_traits< ::brep::canonical_version, id_pgsql >::image_type toolchain_version_value;
+ };
+
+ static bool
+ grow (image_type&,
+ bool*);
+
+ static void
+ bind (pgsql::bind*,
+ image_type&,
+ pgsql::statement_kind);
+
+ static bool
+ init (image_type&,
+ const value_type&,
+ pgsql::statement_kind);
+
+ static void
+ init (value_type&,
+ const image_type&,
+ database*);
+
+ static bool
+ get_null (const image_type&);
+
+ static void
+ set_null (image_type&,
+ pgsql::statement_kind);
+
+ static const std::size_t column_count = 12UL;
+ };
+
+ // build
+ //
+ template <typename A>
+ struct query_columns< ::brep::build, id_pgsql, A >
+ {
+ // id
+ //
+ struct id_class_
+ {
+ id_class_ ()
+ {
+ }
+
+ // package
+ //
+ struct package_class_1_
+ {
+ package_class_1_ ()
+ {
+ }
+
+ // tenant
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::string,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ tenant_type_;
+
+ static const tenant_type_ tenant;
+
+ // name
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::bpkg::package_name,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ name_type_;
+
+ static const name_type_ name;
+
+ // version
+ //
+ struct version_class_2_
+ {
+ version_class_2_ ()
+ {
+ }
+
+ // epoch
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::uint16_t,
+ pgsql::id_integer >::query_type,
+ pgsql::id_integer >
+ epoch_type_;
+
+ static const epoch_type_ epoch;
+
+ // canonical_upstream
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::string,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ canonical_upstream_type_;
+
+ static const canonical_upstream_type_ canonical_upstream;
+
+ // canonical_release
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::string,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ canonical_release_type_;
+
+ static const canonical_release_type_ canonical_release;
+
+ // revision
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::uint16_t,
+ pgsql::id_integer >::query_type,
+ pgsql::id_integer >
+ revision_type_;
+
+ static const revision_type_ revision;
+ };
+
+ static const version_class_2_ version;
+ };
+
+ static const package_class_1_ package;
+
+ // configuration
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::string,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ configuration_type_;
+
+ static const configuration_type_ configuration;
+
+ // toolchain_name
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::string,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ toolchain_name_type_;
+
+ static const toolchain_name_type_ toolchain_name;
+
+ // toolchain_version
+ //
+ struct toolchain_version_class_1_
+ {
+ toolchain_version_class_1_ ()
+ {
+ }
+
+ // epoch
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::uint16_t,
+ pgsql::id_integer >::query_type,
+ pgsql::id_integer >
+ epoch_type_;
+
+ static const epoch_type_ epoch;
+
+ // canonical_upstream
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::string,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ canonical_upstream_type_;
+
+ static const canonical_upstream_type_ canonical_upstream;
+
+ // canonical_release
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::string,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ canonical_release_type_;
+
+ static const canonical_release_type_ canonical_release;
+
+ // revision
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::uint16_t,
+ pgsql::id_integer >::query_type,
+ pgsql::id_integer >
+ revision_type_;
+
+ static const revision_type_ revision;
+ };
+
+ static const toolchain_version_class_1_ toolchain_version;
+ };
+
+ static const id_class_ id;
+
+ // package_version
+ //
+ struct package_version_class_
+ {
+ package_version_class_ ()
+ {
+ }
+
+ // upstream
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::string,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ upstream_type_;
+
+ static const upstream_type_ upstream;
+
+ // release
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::basic_string< char >,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ release_type_;
+
+ static const release_type_ release;
+ };
+
+ static const package_version_class_ package_version;
+
+ // toolchain_version
+ //
+ struct toolchain_version_class_
+ {
+ toolchain_version_class_ ()
+ {
+ }
+
+ // upstream
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::string,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ upstream_type_;
+
+ static const upstream_type_ upstream;
+
+ // release
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::basic_string< char >,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ release_type_;
+
+ static const release_type_ release;
+ };
+
+ static const toolchain_version_class_ toolchain_version;
+
+ // state
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::string,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ state_type_;
+
+ static const state_type_ state;
+
+ // timestamp
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::uint64_t,
+ pgsql::id_bigint >::query_type,
+ pgsql::id_bigint >
+ timestamp_type_;
+
+ static const timestamp_type_ timestamp;
+
+ // force
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::string,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ force_type_;
+
+ static const force_type_ force;
+
+ // status
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::basic_string< char >,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ status_type_;
+
+ static const status_type_ status;
+
+ // completion_timestamp
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::uint64_t,
+ pgsql::id_bigint >::query_type,
+ pgsql::id_bigint >
+ completion_timestamp_type_;
+
+ static const completion_timestamp_type_ completion_timestamp;
+
+ // agent_fingerprint
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::basic_string< char >,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ agent_fingerprint_type_;
+
+ static const agent_fingerprint_type_ agent_fingerprint;
+
+ // agent_challenge
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::basic_string< char >,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ agent_challenge_type_;
+
+ static const agent_challenge_type_ agent_challenge;
+
+ // machine
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::string,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ machine_type_;
+
+ static const machine_type_ machine;
+
+ // machine_summary
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::string,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ machine_summary_type_;
+
+ static const machine_summary_type_ machine_summary;
+
+ // target
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::string,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ target_type_;
+
+ static const target_type_ target;
+ };
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::id_class_::package_class_1_::tenant_type_
+ query_columns< ::brep::build, id_pgsql, A >::id_class_::package_class_1_::
+ tenant (A::table_name, "\"package_tenant\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::id_class_::package_class_1_::name_type_
+ query_columns< ::brep::build, id_pgsql, A >::id_class_::package_class_1_::
+ name (A::table_name, "\"package_name\"", "(?)::CITEXT");
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::id_class_::package_class_1_::version_class_2_::epoch_type_
+ query_columns< ::brep::build, id_pgsql, A >::id_class_::package_class_1_::version_class_2_::
+ epoch (A::table_name, "\"package_version_epoch\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::id_class_::package_class_1_::version_class_2_::canonical_upstream_type_
+ query_columns< ::brep::build, id_pgsql, A >::id_class_::package_class_1_::version_class_2_::
+ canonical_upstream (A::table_name, "\"package_version_canonical_upstream\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::id_class_::package_class_1_::version_class_2_::canonical_release_type_
+ query_columns< ::brep::build, id_pgsql, A >::id_class_::package_class_1_::version_class_2_::
+ canonical_release (A::table_name, "\"package_version_canonical_release\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::id_class_::package_class_1_::version_class_2_::revision_type_
+ query_columns< ::brep::build, id_pgsql, A >::id_class_::package_class_1_::version_class_2_::
+ revision (A::table_name, "\"package_version_revision\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::id_class_::package_class_1_::version_class_2_
+ query_columns< ::brep::build, id_pgsql, A >::id_class_::package_class_1_::version;
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::id_class_::package_class_1_
+ query_columns< ::brep::build, id_pgsql, A >::id_class_::package;
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::id_class_::configuration_type_
+ query_columns< ::brep::build, id_pgsql, A >::id_class_::
+ configuration (A::table_name, "\"configuration\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::id_class_::toolchain_name_type_
+ query_columns< ::brep::build, id_pgsql, A >::id_class_::
+ toolchain_name (A::table_name, "\"toolchain_name\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::id_class_::toolchain_version_class_1_::epoch_type_
+ query_columns< ::brep::build, id_pgsql, A >::id_class_::toolchain_version_class_1_::
+ epoch (A::table_name, "\"toolchain_version_epoch\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::id_class_::toolchain_version_class_1_::canonical_upstream_type_
+ query_columns< ::brep::build, id_pgsql, A >::id_class_::toolchain_version_class_1_::
+ canonical_upstream (A::table_name, "\"toolchain_version_canonical_upstream\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::id_class_::toolchain_version_class_1_::canonical_release_type_
+ query_columns< ::brep::build, id_pgsql, A >::id_class_::toolchain_version_class_1_::
+ canonical_release (A::table_name, "\"toolchain_version_canonical_release\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::id_class_::toolchain_version_class_1_::revision_type_
+ query_columns< ::brep::build, id_pgsql, A >::id_class_::toolchain_version_class_1_::
+ revision (A::table_name, "\"toolchain_version_revision\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::id_class_::toolchain_version_class_1_
+ query_columns< ::brep::build, id_pgsql, A >::id_class_::toolchain_version;
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::id_class_
+ query_columns< ::brep::build, id_pgsql, A >::id;
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::package_version_class_::upstream_type_
+ query_columns< ::brep::build, id_pgsql, A >::package_version_class_::
+ upstream (A::table_name, "\"package_version_upstream\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::package_version_class_::release_type_
+ query_columns< ::brep::build, id_pgsql, A >::package_version_class_::
+ release (A::table_name, "\"package_version_release\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::package_version_class_
+ query_columns< ::brep::build, id_pgsql, A >::package_version;
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::toolchain_version_class_::upstream_type_
+ query_columns< ::brep::build, id_pgsql, A >::toolchain_version_class_::
+ upstream (A::table_name, "\"toolchain_version_upstream\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::toolchain_version_class_::release_type_
+ query_columns< ::brep::build, id_pgsql, A >::toolchain_version_class_::
+ release (A::table_name, "\"toolchain_version_release\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::toolchain_version_class_
+ query_columns< ::brep::build, id_pgsql, A >::toolchain_version;
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::state_type_
+ query_columns< ::brep::build, id_pgsql, A >::
+ state (A::table_name, "\"state\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::timestamp_type_
+ query_columns< ::brep::build, id_pgsql, A >::
+ timestamp (A::table_name, "\"timestamp\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::force_type_
+ query_columns< ::brep::build, id_pgsql, A >::
+ force (A::table_name, "\"force\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::status_type_
+ query_columns< ::brep::build, id_pgsql, A >::
+ status (A::table_name, "\"status\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::completion_timestamp_type_
+ query_columns< ::brep::build, id_pgsql, A >::
+ completion_timestamp (A::table_name, "\"completion_timestamp\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::agent_fingerprint_type_
+ query_columns< ::brep::build, id_pgsql, A >::
+ agent_fingerprint (A::table_name, "\"agent_fingerprint\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::agent_challenge_type_
+ query_columns< ::brep::build, id_pgsql, A >::
+ agent_challenge (A::table_name, "\"agent_challenge\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::machine_type_
+ query_columns< ::brep::build, id_pgsql, A >::
+ machine (A::table_name, "\"machine\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::machine_summary_type_
+ query_columns< ::brep::build, id_pgsql, A >::
+ machine_summary (A::table_name, "\"machine_summary\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build, id_pgsql, A >::target_type_
+ query_columns< ::brep::build, id_pgsql, A >::
+ target (A::table_name, "\"target\"", 0);
+
+ template <typename A>
+ struct pointer_query_columns< ::brep::build, id_pgsql, A >:
+ query_columns< ::brep::build, id_pgsql, A >
+ {
+ };
+
+ template <>
+ class access::object_traits_impl< ::brep::build, id_pgsql >:
+ public access::object_traits< ::brep::build >
+ {
+ public:
+ struct id_image_type
+ {
+ composite_value_traits< ::brep::build_id, id_pgsql >::image_type id_value;
+
+ std::size_t version;
+ };
+
+ struct image_type
+ {
+ // id
+ //
+ composite_value_traits< ::brep::build_id, id_pgsql >::image_type id_value;
+
+ // package_version
+ //
+ composite_value_traits< ::brep::upstream_version, id_pgsql >::image_type package_version_value;
+
+ // toolchain_version
+ //
+ composite_value_traits< ::brep::upstream_version, id_pgsql >::image_type toolchain_version_value;
+
+ // state
+ //
+ details::buffer state_value;
+ std::size_t state_size;
+ bool state_null;
+
+ // timestamp
+ //
+ long long timestamp_value;
+ bool timestamp_null;
+
+ // force
+ //
+ details::buffer force_value;
+ std::size_t force_size;
+ bool force_null;
+
+ // status
+ //
+ details::buffer status_value;
+ std::size_t status_size;
+ bool status_null;
+
+ // completion_timestamp
+ //
+ long long completion_timestamp_value;
+ bool completion_timestamp_null;
+
+ // agent_fingerprint
+ //
+ details::buffer agent_fingerprint_value;
+ std::size_t agent_fingerprint_size;
+ bool agent_fingerprint_null;
+
+ // agent_challenge
+ //
+ details::buffer agent_challenge_value;
+ std::size_t agent_challenge_size;
+ bool agent_challenge_null;
+
+ // machine
+ //
+ details::buffer machine_value;
+ std::size_t machine_size;
+ bool machine_null;
+
+ // machine_summary
+ //
+ details::buffer machine_summary_value;
+ std::size_t machine_summary_size;
+ bool machine_summary_null;
+
+ // target
+ //
+ details::buffer target_value;
+ std::size_t target_size;
+ bool target_null;
+
+ std::size_t version;
+ };
+
+ struct extra_statement_cache_type;
+
+ // results
+ //
+ struct results_traits
+ {
+ static const char select_name[];
+ static const char insert_name[];
+ static const char delete_name[];
+
+ static const unsigned int insert_types[];
+
+ static const std::size_t id_column_count = 12UL;
+ static const std::size_t data_column_count = 16UL;
+
+ static const bool versioned = false;
+
+ static const char insert_statement[];
+ static const char select_statement[];
+ static const char delete_statement[];
+
+ typedef ::bbot::operation_results container_type;
+ typedef
+ odb::access::container_traits<container_type>
+ container_traits_type;
+ typedef container_traits_type::index_type index_type;
+ typedef container_traits_type::value_type value_type;
+
+ typedef ordered_functions<index_type, value_type> functions_type;
+ typedef pgsql::container_statements< results_traits > statements_type;
+
+ struct data_image_type
+ {
+ // index
+ //
+ long long index_value;
+ bool index_null;
+
+ // value
+ //
+ composite_value_traits< value_type, id_pgsql >::image_type value_value;
+
+ std::size_t version;
+ };
+
+ static void
+ bind (pgsql::bind*,
+ const pgsql::bind* id,
+ std::size_t id_size,
+ data_image_type&);
+
+ static void
+ grow (data_image_type&,
+ bool*);
+
+ static void
+ init (data_image_type&,
+ index_type*,
+ const value_type&);
+
+ static void
+ init (index_type&,
+ value_type&,
+ const data_image_type&,
+ database*);
+
+ static void
+ insert (index_type, const value_type&, void*);
+
+ static bool
+ select (index_type&, value_type&, void*);
+
+ static void
+ delete_ (void*);
+
+ static void
+ persist (const container_type&,
+ statements_type&);
+
+ static void
+ load (container_type&,
+ statements_type&);
+
+ static void
+ update (const container_type&,
+ statements_type&);
+
+ static void
+ erase (statements_type&);
+ };
+
+ // results_section
+ //
+ struct results_section_traits
+ {
+ typedef object_traits_impl<object_type, id_pgsql>::image_type image_type;
+ typedef object_traits_impl<object_type, id_pgsql>::id_image_type id_image_type;
+
+ static const std::size_t id_column_count = 12UL;
+ static const std::size_t managed_optimistic_load_column_count = 0UL;
+ static const std::size_t load_column_count = 0UL;
+ static const std::size_t managed_optimistic_update_column_count = 0UL;
+ static const std::size_t update_column_count = 0UL;
+
+ static const bool versioned = false;
+
+ static void
+ load (extra_statement_cache_type&, object_type&);
+
+ static void
+ update (extra_statement_cache_type&, const object_type&);
+ };
+
+ using object_traits<object_type>::id;
+
+ static id_type
+ id (const image_type&);
+
+ static bool
+ grow (image_type&,
+ bool*);
+
+ static void
+ bind (pgsql::bind*,
+ image_type&,
+ pgsql::statement_kind);
+
+ static void
+ bind (pgsql::bind*, id_image_type&);
+
+ static bool
+ init (image_type&,
+ const object_type&,
+ pgsql::statement_kind);
+
+ static void
+ init (object_type&,
+ const image_type&,
+ database*);
+
+ static void
+ init (id_image_type&, const id_type&);
+
+ typedef pgsql::object_statements<object_type> statements_type;
+
+ typedef pgsql::query_base query_base_type;
+
+ static const std::size_t column_count = 26UL;
+ static const std::size_t id_column_count = 12UL;
+ static const std::size_t inverse_column_count = 0UL;
+ static const std::size_t readonly_column_count = 0UL;
+ static const std::size_t managed_optimistic_column_count = 0UL;
+
+ static const std::size_t separate_load_column_count = 0UL;
+ static const std::size_t separate_update_column_count = 0UL;
+
+ static const bool versioned = false;
+
+ static const char persist_statement[];
+ static const char find_statement[];
+ static const char update_statement[];
+ static const char erase_statement[];
+ static const char query_statement[];
+ static const char erase_query_statement[];
+
+ static const char table_name[];
+
+ static void
+ persist (database&, const object_type&);
+
+ static pointer_type
+ find (database&, const id_type&);
+
+ static bool
+ find (database&, const id_type&, object_type&);
+
+ static bool
+ reload (database&, object_type&);
+
+ static void
+ update (database&, const object_type&);
+
+ static void
+ erase (database&, const id_type&);
+
+ static void
+ erase (database&, const object_type&);
+
+ static bool
+ load (connection&, object_type&, section&);
+
+ static bool
+ update (connection&, const object_type&, const section&);
+
+ static result<object_type>
+ query (database&, const query_base_type&);
+
+ static unsigned long long
+ erase_query (database&, const query_base_type&);
+
+ static odb::details::shared_ptr<prepared_query_impl>
+ prepare_query (connection&, const char*, const query_base_type&);
+
+ static odb::details::shared_ptr<result_impl>
+ execute_query (prepared_query_impl&);
+
+ static const char persist_statement_name[];
+ static const char find_statement_name[];
+ static const char update_statement_name[];
+ static const char erase_statement_name[];
+ static const char query_statement_name[];
+ static const char erase_query_statement_name[];
+
+ static const unsigned int persist_statement_types[];
+ static const unsigned int find_statement_types[];
+ static const unsigned int update_statement_types[];
+
+ public:
+ static bool
+ find_ (statements_type&,
+ const id_type*);
+
+ static void
+ load_ (statements_type&,
+ object_type&,
+ bool reload);
+ };
+
+ template <>
+ class access::object_traits_impl< ::brep::build, id_common >:
+ public access::object_traits_impl< ::brep::build, id_pgsql >
+ {
+ };
+
+ // toolchain
+ //
+ template <>
+ class access::view_traits_impl< ::brep::toolchain, id_pgsql >:
+ public access::view_traits< ::brep::toolchain >
+ {
+ public:
+ struct image_type
+ {
+ // name
+ //
+ details::buffer name_value;
+ std::size_t name_size;
+ bool name_null;
+
+ // epoch
+ //
+ int epoch_value;
+ bool epoch_null;
+
+ // canonical_upstream
+ //
+ details::buffer canonical_upstream_value;
+ std::size_t canonical_upstream_size;
+ bool canonical_upstream_null;
+
+ // canonical_release
+ //
+ details::buffer canonical_release_value;
+ std::size_t canonical_release_size;
+ bool canonical_release_null;
+
+ // revision
+ //
+ int revision_value;
+ bool revision_null;
+
+ // version
+ //
+ composite_value_traits< ::brep::upstream_version, id_pgsql >::image_type version_value;
+
+ std::size_t version;
+ };
+
+ typedef pgsql::view_statements<view_type> statements_type;
+
+ typedef pgsql::query_base query_base_type;
+ struct query_columns;
+
+ static const bool versioned = false;
+
+ static bool
+ grow (image_type&,
+ bool*);
+
+ static void
+ bind (pgsql::bind*,
+ image_type&);
+
+ static void
+ init (view_type&,
+ const image_type&,
+ database*);
+
+ static const std::size_t column_count = 7UL;
+
+ static query_base_type
+ query_statement (const query_base_type&);
+
+ static result<view_type>
+ query (database&, const query_base_type&);
+
+ static odb::details::shared_ptr<prepared_query_impl>
+ prepare_query (connection&, const char*, const query_base_type&);
+
+ static odb::details::shared_ptr<result_impl>
+ execute_query (prepared_query_impl&);
+
+ static const char query_statement_name[];
+ };
+
+ template <>
+ class access::view_traits_impl< ::brep::toolchain, id_common >:
+ public access::view_traits_impl< ::brep::toolchain, id_pgsql >
+ {
+ };
+
+ // package_build
+ //
+ template <>
+ class access::view_traits_impl< ::brep::package_build, id_pgsql >:
+ public access::view_traits< ::brep::package_build >
+ {
+ public:
+ struct image_type
+ {
+ // build
+ //
+ object_traits_impl< ::brep::build, id_pgsql >::image_type build_value;
+
+ std::size_t version;
+ };
+
+ typedef pgsql::view_statements<view_type> statements_type;
+
+ typedef pgsql::query_base query_base_type;
+ struct query_columns;
+
+ static const bool versioned = false;
+
+ static bool
+ grow (image_type&,
+ bool*);
+
+ static void
+ bind (pgsql::bind*,
+ image_type&);
+
+ static void
+ init (view_type&,
+ const image_type&,
+ database*);
+
+ static const std::size_t column_count = 26UL;
+
+ static query_base_type
+ query_statement (const query_base_type&);
+
+ static result<view_type>
+ query (database&, const query_base_type&);
+
+ static odb::details::shared_ptr<prepared_query_impl>
+ prepare_query (connection&, const char*, const query_base_type&);
+
+ static odb::details::shared_ptr<result_impl>
+ execute_query (prepared_query_impl&);
+
+ static const char query_statement_name[];
+ };
+
+ template <>
+ class access::view_traits_impl< ::brep::package_build, id_common >:
+ public access::view_traits_impl< ::brep::package_build, id_pgsql >
+ {
+ };
+
+ // package_build_count
+ //
+ template <>
+ class access::view_traits_impl< ::brep::package_build_count, id_pgsql >:
+ public access::view_traits< ::brep::package_build_count >
+ {
+ public:
+ struct image_type
+ {
+ // result
+ //
+ long long result_value;
+ bool result_null;
+
+ std::size_t version;
+ };
+
+ typedef pgsql::view_statements<view_type> statements_type;
+
+ typedef pgsql::query_base query_base_type;
+ struct query_columns;
+
+ static const bool versioned = false;
+
+ static bool
+ grow (image_type&,
+ bool*);
+
+ static void
+ bind (pgsql::bind*,
+ image_type&);
+
+ static void
+ init (view_type&,
+ const image_type&,
+ database*);
+
+ static const std::size_t column_count = 1UL;
+
+ static query_base_type
+ query_statement (const query_base_type&);
+
+ static result<view_type>
+ query (database&, const query_base_type&);
+
+ static odb::details::shared_ptr<prepared_query_impl>
+ prepare_query (connection&, const char*, const query_base_type&);
+
+ static odb::details::shared_ptr<result_impl>
+ execute_query (prepared_query_impl&);
+
+ static const char query_statement_name[];
+ };
+
+ template <>
+ class access::view_traits_impl< ::brep::package_build_count, id_common >:
+ public access::view_traits_impl< ::brep::package_build_count, id_pgsql >
+ {
+ };
+
+ // build_delay
+ //
+ template <typename A>
+ struct query_columns< ::brep::build_delay, id_pgsql, A >
+ {
+ // id
+ //
+ struct id_class_
+ {
+ id_class_ ()
+ {
+ }
+
+ // package
+ //
+ struct package_class_1_
+ {
+ package_class_1_ ()
+ {
+ }
+
+ // tenant
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::string,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ tenant_type_;
+
+ static const tenant_type_ tenant;
+
+ // name
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::bpkg::package_name,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ name_type_;
+
+ static const name_type_ name;
+
+ // version
+ //
+ struct version_class_2_
+ {
+ version_class_2_ ()
+ {
+ }
+
+ // epoch
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::uint16_t,
+ pgsql::id_integer >::query_type,
+ pgsql::id_integer >
+ epoch_type_;
+
+ static const epoch_type_ epoch;
+
+ // canonical_upstream
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::string,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ canonical_upstream_type_;
+
+ static const canonical_upstream_type_ canonical_upstream;
+
+ // canonical_release
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::string,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ canonical_release_type_;
+
+ static const canonical_release_type_ canonical_release;
+
+ // revision
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::uint16_t,
+ pgsql::id_integer >::query_type,
+ pgsql::id_integer >
+ revision_type_;
+
+ static const revision_type_ revision;
+ };
+
+ static const version_class_2_ version;
+ };
+
+ static const package_class_1_ package;
+
+ // configuration
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::string,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ configuration_type_;
+
+ static const configuration_type_ configuration;
+
+ // toolchain_name
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::string,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ toolchain_name_type_;
+
+ static const toolchain_name_type_ toolchain_name;
+
+ // toolchain_version
+ //
+ struct toolchain_version_class_1_
+ {
+ toolchain_version_class_1_ ()
+ {
+ }
+
+ // epoch
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::uint16_t,
+ pgsql::id_integer >::query_type,
+ pgsql::id_integer >
+ epoch_type_;
+
+ static const epoch_type_ epoch;
+
+ // canonical_upstream
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::string,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ canonical_upstream_type_;
+
+ static const canonical_upstream_type_ canonical_upstream;
+
+ // canonical_release
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::string,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ canonical_release_type_;
+
+ static const canonical_release_type_ canonical_release;
+
+ // revision
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::uint16_t,
+ pgsql::id_integer >::query_type,
+ pgsql::id_integer >
+ revision_type_;
+
+ static const revision_type_ revision;
+ };
+
+ static const toolchain_version_class_1_ toolchain_version;
+ };
+
+ static const id_class_ id;
+
+ // package_version
+ //
+ struct package_version_class_
+ {
+ package_version_class_ ()
+ {
+ }
+
+ // upstream
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::string,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ upstream_type_;
+
+ static const upstream_type_ upstream;
+
+ // release
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::basic_string< char >,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ release_type_;
+
+ static const release_type_ release;
+ };
+
+ static const package_version_class_ package_version;
+
+ // toolchain_version
+ //
+ struct toolchain_version_class_
+ {
+ toolchain_version_class_ ()
+ {
+ }
+
+ // upstream
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::string,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ upstream_type_;
+
+ static const upstream_type_ upstream;
+
+ // release
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::std::basic_string< char >,
+ pgsql::id_string >::query_type,
+ pgsql::id_string >
+ release_type_;
+
+ static const release_type_ release;
+ };
+
+ static const toolchain_version_class_ toolchain_version;
+
+ // report_timestamp
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::uint64_t,
+ pgsql::id_bigint >::query_type,
+ pgsql::id_bigint >
+ report_timestamp_type_;
+
+ static const report_timestamp_type_ report_timestamp;
+
+ // package_timestamp
+ //
+ typedef
+ pgsql::query_column<
+ pgsql::value_traits<
+ ::uint64_t,
+ pgsql::id_bigint >::query_type,
+ pgsql::id_bigint >
+ package_timestamp_type_;
+
+ static const package_timestamp_type_ package_timestamp;
+ };
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::package_class_1_::tenant_type_
+ query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::package_class_1_::
+ tenant (A::table_name, "\"package_tenant\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::package_class_1_::name_type_
+ query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::package_class_1_::
+ name (A::table_name, "\"package_name\"", "(?)::CITEXT");
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::package_class_1_::version_class_2_::epoch_type_
+ query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::package_class_1_::version_class_2_::
+ epoch (A::table_name, "\"package_version_epoch\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::package_class_1_::version_class_2_::canonical_upstream_type_
+ query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::package_class_1_::version_class_2_::
+ canonical_upstream (A::table_name, "\"package_version_canonical_upstream\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::package_class_1_::version_class_2_::canonical_release_type_
+ query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::package_class_1_::version_class_2_::
+ canonical_release (A::table_name, "\"package_version_canonical_release\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::package_class_1_::version_class_2_::revision_type_
+ query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::package_class_1_::version_class_2_::
+ revision (A::table_name, "\"package_version_revision\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::package_class_1_::version_class_2_
+ query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::package_class_1_::version;
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::package_class_1_
+ query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::package;
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::configuration_type_
+ query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::
+ configuration (A::table_name, "\"configuration\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::toolchain_name_type_
+ query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::
+ toolchain_name (A::table_name, "\"toolchain_name\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::toolchain_version_class_1_::epoch_type_
+ query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::toolchain_version_class_1_::
+ epoch (A::table_name, "\"toolchain_version_epoch\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::toolchain_version_class_1_::canonical_upstream_type_
+ query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::toolchain_version_class_1_::
+ canonical_upstream (A::table_name, "\"toolchain_version_canonical_upstream\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::toolchain_version_class_1_::canonical_release_type_
+ query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::toolchain_version_class_1_::
+ canonical_release (A::table_name, "\"toolchain_version_canonical_release\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::toolchain_version_class_1_::revision_type_
+ query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::toolchain_version_class_1_::
+ revision (A::table_name, "\"toolchain_version_revision\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::toolchain_version_class_1_
+ query_columns< ::brep::build_delay, id_pgsql, A >::id_class_::toolchain_version;
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::id_class_
+ query_columns< ::brep::build_delay, id_pgsql, A >::id;
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::package_version_class_::upstream_type_
+ query_columns< ::brep::build_delay, id_pgsql, A >::package_version_class_::
+ upstream (A::table_name, "\"package_version_upstream\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::package_version_class_::release_type_
+ query_columns< ::brep::build_delay, id_pgsql, A >::package_version_class_::
+ release (A::table_name, "\"package_version_release\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::package_version_class_
+ query_columns< ::brep::build_delay, id_pgsql, A >::package_version;
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::toolchain_version_class_::upstream_type_
+ query_columns< ::brep::build_delay, id_pgsql, A >::toolchain_version_class_::
+ upstream (A::table_name, "\"toolchain_version_upstream\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::toolchain_version_class_::release_type_
+ query_columns< ::brep::build_delay, id_pgsql, A >::toolchain_version_class_::
+ release (A::table_name, "\"toolchain_version_release\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::toolchain_version_class_
+ query_columns< ::brep::build_delay, id_pgsql, A >::toolchain_version;
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::report_timestamp_type_
+ query_columns< ::brep::build_delay, id_pgsql, A >::
+ report_timestamp (A::table_name, "\"report_timestamp\"", 0);
+
+ template <typename A>
+ const typename query_columns< ::brep::build_delay, id_pgsql, A >::package_timestamp_type_
+ query_columns< ::brep::build_delay, id_pgsql, A >::
+ package_timestamp (A::table_name, "\"package_timestamp\"", 0);
+
+ template <typename A>
+ struct pointer_query_columns< ::brep::build_delay, id_pgsql, A >:
+ query_columns< ::brep::build_delay, id_pgsql, A >
+ {
+ };
+
+ template <>
+ class access::object_traits_impl< ::brep::build_delay, id_pgsql >:
+ public access::object_traits< ::brep::build_delay >
+ {
+ public:
+ struct id_image_type
+ {
+ composite_value_traits< ::brep::build_id, id_pgsql >::image_type id_value;
+
+ std::size_t version;
+ };
+
+ struct image_type
+ {
+ // id
+ //
+ composite_value_traits< ::brep::build_id, id_pgsql >::image_type id_value;
+
+ // package_version
+ //
+ composite_value_traits< ::brep::upstream_version, id_pgsql >::image_type package_version_value;
+
+ // toolchain_version
+ //
+ composite_value_traits< ::brep::upstream_version, id_pgsql >::image_type toolchain_version_value;
+
+ // report_timestamp
+ //
+ long long report_timestamp_value;
+ bool report_timestamp_null;
+
+ // package_timestamp
+ //
+ long long package_timestamp_value;
+ bool package_timestamp_null;
+
+ std::size_t version;
+ };
+
+ struct extra_statement_cache_type;
+
+ using object_traits<object_type>::id;
+
+ static id_type
+ id (const image_type&);
+
+ static bool
+ grow (image_type&,
+ bool*);
+
+ static void
+ bind (pgsql::bind*,
+ image_type&,
+ pgsql::statement_kind);
+
+ static void
+ bind (pgsql::bind*, id_image_type&);
+
+ static bool
+ init (image_type&,
+ const object_type&,
+ pgsql::statement_kind);
+
+ static void
+ init (object_type&,
+ const image_type&,
+ database*);
+
+ static void
+ init (id_image_type&, const id_type&);
+
+ typedef pgsql::object_statements<object_type> statements_type;
+
+ typedef pgsql::query_base query_base_type;
+
+ static const std::size_t column_count = 18UL;
+ static const std::size_t id_column_count = 12UL;
+ static const std::size_t inverse_column_count = 0UL;
+ static const std::size_t readonly_column_count = 0UL;
+ static const std::size_t managed_optimistic_column_count = 0UL;
+
+ static const std::size_t separate_load_column_count = 0UL;
+ static const std::size_t separate_update_column_count = 0UL;
+
+ static const bool versioned = false;
+
+ static const char persist_statement[];
+ static const char find_statement[];
+ static const char update_statement[];
+ static const char erase_statement[];
+ static const char query_statement[];
+ static const char erase_query_statement[];
+
+ static const char table_name[];
+
+ static void
+ persist (database&, const object_type&);
+
+ static pointer_type
+ find (database&, const id_type&);
+
+ static bool
+ find (database&, const id_type&, object_type&);
+
+ static bool
+ reload (database&, object_type&);
+
+ static void
+ update (database&, const object_type&);
+
+ static void
+ erase (database&, const id_type&);
+
+ static void
+ erase (database&, const object_type&);
+
+ static result<object_type>
+ query (database&, const query_base_type&);
+
+ static unsigned long long
+ erase_query (database&, const query_base_type&);
+
+ static odb::details::shared_ptr<prepared_query_impl>
+ prepare_query (connection&, const char*, const query_base_type&);
+
+ static odb::details::shared_ptr<result_impl>
+ execute_query (prepared_query_impl&);
+
+ static const char persist_statement_name[];
+ static const char find_statement_name[];
+ static const char update_statement_name[];
+ static const char erase_statement_name[];
+ static const char query_statement_name[];
+ static const char erase_query_statement_name[];
+
+ static const unsigned int persist_statement_types[];
+ static const unsigned int find_statement_types[];
+ static const unsigned int update_statement_types[];
+
+ public:
+ static bool
+ find_ (statements_type&,
+ const id_type*);
+
+ static void
+ load_ (statements_type&,
+ object_type&,
+ bool reload);
+ };
+
+ template <>
+ class access::object_traits_impl< ::brep::build_delay, id_common >:
+ public access::object_traits_impl< ::brep::build_delay, id_pgsql >
+ {
+ };
+
+ // build
+ //
+ // toolchain
+ //
+ struct access::view_traits_impl< ::brep::toolchain, id_pgsql >::query_columns
+ {
+ // build
+ //
+ typedef
+ odb::pointer_query_columns<
+ ::brep::build,
+ id_pgsql,
+ odb::access::object_traits_impl< ::brep::build, id_pgsql > >
+ build;
+
+ // build_package
+ //
+ typedef
+ odb::pointer_query_columns<
+ ::brep::build_package,
+ id_pgsql,
+ odb::access::object_traits_impl< ::brep::build_package, id_pgsql > >
+ build_package;
+ };
+
+ // package_build
+ //
+ struct access::view_traits_impl< ::brep::package_build, id_pgsql >::query_columns
+ {
+ // build
+ //
+ typedef
+ odb::pointer_query_columns<
+ ::brep::build,
+ id_pgsql,
+ odb::access::object_traits_impl< ::brep::build, id_pgsql > >
+ build;
+
+ // build_package
+ //
+ typedef
+ odb::pointer_query_columns<
+ ::brep::build_package,
+ id_pgsql,
+ odb::access::object_traits_impl< ::brep::build_package, id_pgsql > >
+ build_package;
+
+ // build_tenant
+ //
+ typedef
+ odb::pointer_query_columns<
+ ::brep::build_tenant,
+ id_pgsql,
+ odb::access::object_traits_impl< ::brep::build_tenant, id_pgsql > >
+ build_tenant;
+ };
+
+ // package_build_count
+ //
+ struct access::view_traits_impl< ::brep::package_build_count, id_pgsql >::query_columns
+ {
+ // build
+ //
+ typedef
+ odb::pointer_query_columns<
+ ::brep::build,
+ id_pgsql,
+ odb::access::object_traits_impl< ::brep::build, id_pgsql > >
+ build;
+
+ // build_package
+ //
+ typedef
+ odb::pointer_query_columns<
+ ::brep::build_package,
+ id_pgsql,
+ odb::access::object_traits_impl< ::brep::build_package, id_pgsql > >
+ build_package;
+
+ // build_tenant
+ //
+ typedef
+ odb::pointer_query_columns<
+ ::brep::build_tenant,
+ id_pgsql,
+ odb::access::object_traits_impl< ::brep::build_tenant, id_pgsql > >
+ build_tenant;
+ };
+
+ // build_delay
+ //
+}
+
+#include <libbrep/build-odb.ixx>
+
+#include <odb/post.hxx>
+
+#endif // LIBBREP_BUILD_ODB_HXX