diff options
Diffstat (limited to 'libbrep/common-odb.hxx')
-rw-r--r-- | libbrep/common-odb.hxx | 526 |
1 files changed, 526 insertions, 0 deletions
diff --git a/libbrep/common-odb.hxx b/libbrep/common-odb.hxx new file mode 100644 index 0000000..1bf0aaa --- /dev/null +++ b/libbrep/common-odb.hxx @@ -0,0 +1,526 @@ +// -*- C++ -*- +// +// This file was generated by ODB, object-relational mapping (ORM) +// compiler for C++. +// + +#ifndef LIBBREP_COMMON_ODB_HXX +#define LIBBREP_COMMON_ODB_HXX + +// Begin prologue. +// +#include <libbutl/small-vector-odb.hxx> +#include <libbrep/wrapper-traits.hxx> +#include <libbrep/common-traits.hxx> +// +// End prologue. + +#include <odb/version.hxx> + +#if (ODB_VERSION != 20470UL) +#error ODB runtime version mismatch +#endif + +#include <odb/pre.hxx> + +#include <libbrep/common.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/no-op-cache-traits.hxx> +#include <odb/result.hxx> + +#include <odb/details/unused.hxx> +#include <odb/details/shared-ptr.hxx> + +namespace odb +{ +} + +#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 +{ + // _version + // + template <> + class access::composite_value_traits< ::brep::_version, id_pgsql > + { + public: + typedef ::brep::_version value_type; + + struct image_type + { + // 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; + + // upstream + // + details::buffer upstream_value; + std::size_t upstream_size; + bool upstream_null; + + // release + // + details::buffer release_value; + std::size_t release_size; + bool release_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 = 6UL; + }; + + // build_constraint + // + template <> + class access::composite_value_traits< ::bpkg::build_constraint, id_pgsql > + { + public: + typedef ::bpkg::build_constraint value_type; + + struct image_type + { + // exclusion + // + bool exclusion_value; + bool exclusion_null; + + // config + // + details::buffer config_value; + std::size_t config_size; + bool config_null; + + // target + // + details::buffer target_value; + std::size_t target_size; + bool target_null; + + // comment + // + details::buffer comment_value; + std::size_t comment_size; + bool comment_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 = 4UL; + }; + + // build_class_expr + // + template <> + class access::composite_value_traits< ::bpkg::build_class_expr, id_pgsql > + { + public: + typedef ::bpkg::build_class_expr value_type; + + struct image_type + { + // expression + // + details::buffer expression_value; + std::size_t expression_size; + bool expression_null; + + // comment + // + details::buffer comment_value; + std::size_t comment_size; + bool comment_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 = 2UL; + }; + + // canonical_version + // + template <> + class access::composite_value_traits< ::brep::canonical_version, id_pgsql > + { + public: + typedef ::brep::canonical_version value_type; + + struct image_type + { + // 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; + }; + + 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 = 4UL; + }; + + // upstream_version + // + template <> + class access::composite_value_traits< ::brep::upstream_version, id_pgsql > + { + public: + typedef ::brep::upstream_version value_type; + + struct image_type + { + // upstream_ + // + details::buffer upstream_value; + std::size_t upstream_size; + bool upstream_null; + + // release_ + // + details::buffer release_value; + std::size_t release_size; + bool release_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 = 2UL; + }; + + // package_id + // + template <> + class access::composite_value_traits< ::brep::package_id, id_pgsql > + { + public: + typedef ::brep::package_id value_type; + + struct image_type + { + // tenant + // + details::buffer tenant_value; + std::size_t tenant_size; + bool tenant_null; + + // name + // + details::buffer name_value; + std::size_t name_size; + bool name_null; + + // version + // + composite_value_traits< ::brep::canonical_version, id_pgsql >::image_type 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 = 6UL; + }; + + // _repository_location + // + template <> + class access::composite_value_traits< ::brep::_repository_location, id_pgsql > + { + public: + typedef ::brep::_repository_location value_type; + + struct image_type + { + // url + // + details::buffer url_value; + std::size_t url_size; + bool url_null; + + // type + // + details::buffer type_value; + std::size_t type_size; + bool type_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 = 2UL; + }; + + // repository_id + // + template <> + class access::composite_value_traits< ::brep::repository_id, id_pgsql > + { + public: + typedef ::brep::repository_id value_type; + + struct image_type + { + // tenant + // + details::buffer tenant_value; + std::size_t tenant_size; + bool tenant_null; + + // canonical_name + // + details::buffer canonical_name_value; + std::size_t canonical_name_size; + bool canonical_name_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 = 2UL; + }; +} + +#include <libbrep/common-odb.ixx> + +#include <odb/post.hxx> + +#endif // LIBBREP_COMMON_ODB_HXX |