mirror of
https://github.com/latentPrion/cppbessot.git
synced 2026-04-17 18:44:23 +00:00
Add generated test-schema-v1.2
This commit is contained in:
353
db/test-schema-v1.2/generated-odb-source/postgre/Agent-odb.hxx
Normal file
353
db/test-schema-v1.2/generated-odb-source/postgre/Agent-odb.hxx
Normal file
@@ -0,0 +1,353 @@
|
||||
// This file was generated by ODB, object-relational mapping (ORM)
|
||||
// compiler for C++.
|
||||
//
|
||||
|
||||
#ifndef AGENT_ODB_HXX
|
||||
#define AGENT_ODB_HXX
|
||||
|
||||
#include <odb/version.hxx>
|
||||
|
||||
#if (ODB_VERSION != 20400UL)
|
||||
#error ODB runtime version mismatch
|
||||
#endif
|
||||
|
||||
#include <odb/pre.hxx>
|
||||
|
||||
#include "Agent.h"
|
||||
|
||||
#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/simple-object-result.hxx>
|
||||
|
||||
#include <odb/details/unused.hxx>
|
||||
#include <odb/details/shared-ptr.hxx>
|
||||
|
||||
namespace odb
|
||||
{
|
||||
// Agent
|
||||
//
|
||||
template <>
|
||||
struct class_traits< ::models::Agent >
|
||||
{
|
||||
static const class_kind kind = class_object;
|
||||
};
|
||||
|
||||
template <>
|
||||
class access::object_traits< ::models::Agent >
|
||||
{
|
||||
public:
|
||||
typedef ::models::Agent object_type;
|
||||
typedef ::models::Agent* pointer_type;
|
||||
typedef odb::pointer_traits<pointer_type> pointer_traits;
|
||||
|
||||
static const bool polymorphic = false;
|
||||
|
||||
typedef ::std::string id_type;
|
||||
|
||||
static const bool auto_id = false;
|
||||
|
||||
static const bool abstract = false;
|
||||
|
||||
static id_type
|
||||
id (const object_type&);
|
||||
|
||||
typedef
|
||||
no_op_pointer_cache_traits<pointer_type>
|
||||
pointer_cache_traits;
|
||||
|
||||
typedef
|
||||
no_op_reference_cache_traits<object_type>
|
||||
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
|
||||
{
|
||||
// Agent
|
||||
//
|
||||
template <typename A>
|
||||
struct query_columns< ::models::Agent, id_pgsql, A >
|
||||
{
|
||||
// id
|
||||
//
|
||||
typedef
|
||||
pgsql::query_column<
|
||||
pgsql::value_traits<
|
||||
::std::string,
|
||||
pgsql::id_string >::query_type,
|
||||
pgsql::id_string >
|
||||
id_type_;
|
||||
|
||||
static const id_type_ id;
|
||||
|
||||
// role
|
||||
//
|
||||
typedef
|
||||
pgsql::query_column<
|
||||
pgsql::value_traits<
|
||||
::std::string,
|
||||
pgsql::id_string >::query_type,
|
||||
pgsql::id_string >
|
||||
role_type_;
|
||||
|
||||
static const role_type_ role;
|
||||
|
||||
// persistent
|
||||
//
|
||||
typedef
|
||||
pgsql::query_column<
|
||||
pgsql::value_traits<
|
||||
bool,
|
||||
pgsql::id_boolean >::query_type,
|
||||
pgsql::id_boolean >
|
||||
persistent_type_;
|
||||
|
||||
static const persistent_type_ persistent;
|
||||
|
||||
// displayName
|
||||
//
|
||||
typedef
|
||||
pgsql::query_column<
|
||||
pgsql::value_traits<
|
||||
::std::string,
|
||||
pgsql::id_string >::query_type,
|
||||
pgsql::id_string >
|
||||
displayName_type_;
|
||||
|
||||
static const displayName_type_ displayName;
|
||||
|
||||
// trustScore
|
||||
//
|
||||
typedef
|
||||
pgsql::query_column<
|
||||
pgsql::value_traits<
|
||||
::int32_t,
|
||||
pgsql::id_integer >::query_type,
|
||||
pgsql::id_integer >
|
||||
trustScore_type_;
|
||||
|
||||
static const trustScore_type_ trustScore;
|
||||
};
|
||||
|
||||
template <typename A>
|
||||
const typename query_columns< ::models::Agent, id_pgsql, A >::id_type_
|
||||
query_columns< ::models::Agent, id_pgsql, A >::
|
||||
id (A::table_name, "\"id\"", 0);
|
||||
|
||||
template <typename A>
|
||||
const typename query_columns< ::models::Agent, id_pgsql, A >::role_type_
|
||||
query_columns< ::models::Agent, id_pgsql, A >::
|
||||
role (A::table_name, "\"role\"", 0);
|
||||
|
||||
template <typename A>
|
||||
const typename query_columns< ::models::Agent, id_pgsql, A >::persistent_type_
|
||||
query_columns< ::models::Agent, id_pgsql, A >::
|
||||
persistent (A::table_name, "\"persistent\"", 0);
|
||||
|
||||
template <typename A>
|
||||
const typename query_columns< ::models::Agent, id_pgsql, A >::displayName_type_
|
||||
query_columns< ::models::Agent, id_pgsql, A >::
|
||||
displayName (A::table_name, "\"displayName\"", 0);
|
||||
|
||||
template <typename A>
|
||||
const typename query_columns< ::models::Agent, id_pgsql, A >::trustScore_type_
|
||||
query_columns< ::models::Agent, id_pgsql, A >::
|
||||
trustScore (A::table_name, "\"trustScore\"", 0);
|
||||
|
||||
template <typename A>
|
||||
struct pointer_query_columns< ::models::Agent, id_pgsql, A >:
|
||||
query_columns< ::models::Agent, id_pgsql, A >
|
||||
{
|
||||
};
|
||||
|
||||
template <>
|
||||
class access::object_traits_impl< ::models::Agent, id_pgsql >:
|
||||
public access::object_traits< ::models::Agent >
|
||||
{
|
||||
public:
|
||||
struct id_image_type
|
||||
{
|
||||
details::buffer id_value;
|
||||
std::size_t id_size;
|
||||
bool id_null;
|
||||
|
||||
std::size_t version;
|
||||
};
|
||||
|
||||
struct image_type
|
||||
{
|
||||
// id
|
||||
//
|
||||
details::buffer id_value;
|
||||
std::size_t id_size;
|
||||
bool id_null;
|
||||
|
||||
// role
|
||||
//
|
||||
details::buffer role_value;
|
||||
std::size_t role_size;
|
||||
bool role_null;
|
||||
|
||||
// persistent
|
||||
//
|
||||
bool persistent_value;
|
||||
bool persistent_null;
|
||||
|
||||
// displayName
|
||||
//
|
||||
details::buffer displayName_value;
|
||||
std::size_t displayName_size;
|
||||
bool displayName_null;
|
||||
|
||||
// trustScore
|
||||
//
|
||||
int trustScore_value;
|
||||
bool trustScore_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 = 5UL;
|
||||
static const std::size_t id_column_count = 1UL;
|
||||
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 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< ::models::Agent, id_common >:
|
||||
public access::object_traits_impl< ::models::Agent, id_pgsql >
|
||||
{
|
||||
};
|
||||
|
||||
// Agent
|
||||
//
|
||||
}
|
||||
|
||||
#include "Agent-odb.ixx"
|
||||
|
||||
#include <odb/post.hxx>
|
||||
|
||||
#endif // AGENT_ODB_HXX
|
||||
Reference in New Issue
Block a user