// This file was generated by ODB, object-relational mapping (ORM) // compiler for C++. // #ifndef EMPLOYEE_ODB_HXX #define EMPLOYEE_ODB_HXX #include #if (ODB_VERSION != 10800UL) #error ODB runtime version mismatch #endif #include // Begin prologue. // // // End prologue. #include "employee.hxx" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace odb { // employer // template <> struct class_traits< ::employer > { static const class_kind kind = class_object; }; template struct query_columns< ::employer, table > { // name // typedef mysql::query_column< mysql::value_traits< ::std::string, mysql::id_string >::query_type, mysql::id_string > name_type_; static const name_type_ name; }; template const typename query_columns< ::employer, table >::name_type_ query_columns< ::employer, table >::name (table, "`name`"); template struct pointer_query_columns< ::employer, table >: query_columns< ::employer, table > { }; template <> class access::object_traits< ::employer > { public: typedef ::employer object_type; typedef ::employer* pointer_type; typedef ::std::string id_type; static const bool auto_id = false; struct id_image_type { details::buffer id_value; unsigned long id_size; my_bool id_null; std::size_t version; }; struct image_type { // name_ // details::buffer name_value; unsigned long name_size; my_bool name_null; std::size_t version; }; // employees_ // struct employees_traits { static const std::size_t id_column_count = 1UL; static const std::size_t cond_column_count = 1UL; static const std::size_t data_column_count = 2UL; static const char insert_one_statement[]; static const char select_all_statement[]; static const char delete_all_statement[]; typedef ::employer::employees_type 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 functions_type; typedef mysql::container_statements< employees_traits > statements_type; struct cond_image_type { std::size_t version; }; struct data_image_type { // value // unsigned long long value_value; my_bool value_null; std::size_t version; }; static void bind (MYSQL_BIND*, const MYSQL_BIND* id, std::size_t id_size, cond_image_type&); static void bind (MYSQL_BIND*, const MYSQL_BIND* id, std::size_t id_size, data_image_type&); static void grow (data_image_type&, my_bool*); static void init (value_type&, const data_image_type&, database&); static void insert_one (index_type, const value_type&, void*); static bool load_all (index_type&, value_type&, void*); static void delete_all (void*); static void load (container_type&, const mysql::binding& id, statements_type&); }; static id_type id (const object_type&); static id_type id (const image_type&); static bool grow (image_type&, my_bool*); static void bind (MYSQL_BIND*, image_type&, mysql::statement_kind); static void bind (MYSQL_BIND*, id_image_type&); static bool init (image_type&, const object_type&, mysql::statement_kind); static void init (object_type&, const image_type&, database&); static void init (id_image_type&, const id_type&); typedef mysql::query query_base_type; struct query_type; struct container_statement_cache_type; static const std::size_t column_count = 1UL; 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 char persist_statement[]; static const char find_statement[]; static const char erase_statement[]; static const char query_statement[]; static const char erase_query_statement[]; static const char table_name[]; static void callback (database&, object_type&, callback_event); static void callback (database&, const object_type&, callback_event); 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 query (database&, const query_base_type&); static unsigned long long erase_query (database&, const query_base_type&); public: static bool find_ (mysql::object_statements< object_type >&, const id_type&); static void load_ (mysql::object_statements< object_type >&, object_type&); }; // position // template <> struct class_traits< ::position > { static const class_kind kind = class_object; }; template struct pointer_query_columns< ::position, table > { // id // typedef mysql::query_column< mysql::value_traits< long unsigned int, mysql::id_ulonglong >::query_type, mysql::id_ulonglong > id_type_; static const id_type_ id; // title // typedef mysql::query_column< mysql::value_traits< ::std::string, mysql::id_string >::query_type, mysql::id_string > title_type_; static const title_type_ title; }; template const typename pointer_query_columns< ::position, table >::id_type_ pointer_query_columns< ::position, table >::id (table, "`id`"); template const typename pointer_query_columns< ::position, table >::title_type_ pointer_query_columns< ::position, table >::title (table, "`title`"); template <> class access::object_traits< ::position > { public: typedef ::position object_type; typedef ::position* pointer_type; typedef long unsigned int id_type; static const bool auto_id = true; struct id_image_type { unsigned long long id_value; my_bool id_null; std::size_t version; }; struct image_type { // id_ // unsigned long long id_value; my_bool id_null; // title_ // details::buffer title_value; unsigned long title_size; my_bool title_null; // employee_ // unsigned long long employee_value; my_bool employee_null; std::size_t version; }; static id_type id (const object_type&); static id_type id (const image_type&); static bool grow (image_type&, my_bool*); static void bind (MYSQL_BIND*, image_type&, mysql::statement_kind); static void bind (MYSQL_BIND*, id_image_type&); static bool init (image_type&, const object_type&, mysql::statement_kind); static void init (object_type&, const image_type&, database&); static void init (id_image_type&, const id_type&); typedef mysql::query query_base_type; struct query_type; struct container_statement_cache_type; static const std::size_t column_count = 3UL; static const std::size_t id_column_count = 1UL; static const std::size_t inverse_column_count = 1UL; static const std::size_t readonly_column_count = 0UL; static const std::size_t managed_optimistic_column_count = 0UL; 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 callback (database&, object_type&, callback_event); static void callback (database&, const object_type&, callback_event); static void persist (database&, 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 query (database&, const query_base_type&); static unsigned long long erase_query (database&, const query_base_type&); public: static bool find_ (mysql::object_statements< object_type >&, const id_type&); static void load_ (mysql::object_statements< object_type >&, object_type&); }; // project // template <> struct class_traits< ::project > { static const class_kind kind = class_object; }; template struct query_columns< ::project, table > { // name // typedef mysql::query_column< mysql::value_traits< ::std::string, mysql::id_string >::query_type, mysql::id_string > name_type_; static const name_type_ name; }; template const typename query_columns< ::project, table >::name_type_ query_columns< ::project, table >::name (table, "`name`"); template struct pointer_query_columns< ::project, table >: query_columns< ::project, table > { }; template <> class access::object_traits< ::project > { public: typedef ::project object_type; typedef ::project* pointer_type; typedef ::std::string id_type; static const bool auto_id = false; struct id_image_type { details::buffer id_value; unsigned long id_size; my_bool id_null; std::size_t version; }; struct image_type { // name_ // details::buffer name_value; unsigned long name_size; my_bool name_null; std::size_t version; }; // employees_ // struct employees_traits { static const std::size_t id_column_count = 1UL; static const std::size_t cond_column_count = 1UL; static const std::size_t data_column_count = 2UL; static const char insert_one_statement[]; static const char select_all_statement[]; static const char delete_all_statement[]; typedef ::project::employees_type 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 functions_type; typedef mysql::container_statements< employees_traits > statements_type; struct cond_image_type { std::size_t version; }; struct data_image_type { // value // unsigned long long value_value; my_bool value_null; std::size_t version; }; static void bind (MYSQL_BIND*, const MYSQL_BIND* id, std::size_t id_size, cond_image_type&); static void bind (MYSQL_BIND*, const MYSQL_BIND* id, std::size_t id_size, data_image_type&); static void grow (data_image_type&, my_bool*); static void init (value_type&, const data_image_type&, database&); static void insert_one (index_type, const value_type&, void*); static bool load_all (index_type&, value_type&, void*); static void delete_all (void*); static void load (container_type&, const mysql::binding& id, statements_type&); }; static id_type id (const object_type&); static id_type id (const image_type&); static bool grow (image_type&, my_bool*); static void bind (MYSQL_BIND*, image_type&, mysql::statement_kind); static void bind (MYSQL_BIND*, id_image_type&); static bool init (image_type&, const object_type&, mysql::statement_kind); static void init (object_type&, const image_type&, database&); static void init (id_image_type&, const id_type&); typedef mysql::query query_base_type; struct query_type; struct container_statement_cache_type; static const std::size_t column_count = 1UL; 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 char persist_statement[]; static const char find_statement[]; static const char erase_statement[]; static const char query_statement[]; static const char erase_query_statement[]; static const char table_name[]; static void callback (database&, object_type&, callback_event); static void callback (database&, const object_type&, callback_event); 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 query (database&, const query_base_type&); static unsigned long long erase_query (database&, const query_base_type&); public: static bool find_ (mysql::object_statements< object_type >&, const id_type&); static void load_ (mysql::object_statements< object_type >&, object_type&); }; // employee // template <> struct class_traits< ::employee > { static const class_kind kind = class_object; }; template struct pointer_query_columns< ::employee, table > { // id // typedef mysql::query_column< mysql::value_traits< long unsigned int, mysql::id_ulonglong >::query_type, mysql::id_ulonglong > id_type_; static const id_type_ id; // first // typedef mysql::query_column< mysql::value_traits< ::std::string, mysql::id_string >::query_type, mysql::id_string > first_type_; static const first_type_ first; // last // typedef mysql::query_column< mysql::value_traits< ::std::string, mysql::id_string >::query_type, mysql::id_string > last_type_; static const last_type_ last; // employer // typedef mysql::query_column< mysql::value_traits< ::std::string, mysql::id_string >::query_type, mysql::id_string > employer_type_; static const employer_type_ employer; // position // typedef mysql::query_column< mysql::value_traits< long unsigned int, mysql::id_ulonglong >::query_type, mysql::id_ulonglong > position_type_; static const position_type_ position; }; template const typename pointer_query_columns< ::employee, table >::id_type_ pointer_query_columns< ::employee, table >::id (table, "`id`"); template const typename pointer_query_columns< ::employee, table >::first_type_ pointer_query_columns< ::employee, table >::first (table, "`first`"); template const typename pointer_query_columns< ::employee, table >::last_type_ pointer_query_columns< ::employee, table >::last (table, "`last`"); template const typename pointer_query_columns< ::employee, table >::employer_type_ pointer_query_columns< ::employee, table >::employer (table, "`employer`"); template const typename pointer_query_columns< ::employee, table >::position_type_ pointer_query_columns< ::employee, table >::position (table, "`position`"); template <> class access::object_traits< ::employee > { public: typedef ::employee object_type; typedef ::employee* pointer_type; typedef long unsigned int id_type; static const bool auto_id = true; struct id_image_type { unsigned long long id_value; my_bool id_null; std::size_t version; }; struct image_type { // id_ // unsigned long long id_value; my_bool id_null; // first_ // details::buffer first_value; unsigned long first_size; my_bool first_null; // last_ // details::buffer last_value; unsigned long last_size; my_bool last_null; // employer_ // details::buffer employer_value; unsigned long employer_size; my_bool employer_null; // position_ // unsigned long long position_value; my_bool position_null; std::size_t version; }; // projects_ // struct projects_traits { static const std::size_t id_column_count = 1UL; static const std::size_t cond_column_count = 1UL; static const std::size_t data_column_count = 2UL; static const char insert_one_statement[]; static const char select_all_statement[]; static const char delete_all_statement[]; typedef ::employee::projects_type 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 functions_type; typedef mysql::container_statements< projects_traits > statements_type; struct cond_image_type { std::size_t version; }; struct data_image_type { // value // details::buffer value_value; unsigned long value_size; my_bool value_null; std::size_t version; }; static void bind (MYSQL_BIND*, const MYSQL_BIND* id, std::size_t id_size, cond_image_type&); static void bind (MYSQL_BIND*, const MYSQL_BIND* id, std::size_t id_size, data_image_type&); static void grow (data_image_type&, my_bool*); static void init (data_image_type&, const value_type&); static void init (value_type&, const data_image_type&, database&); static void insert_one (index_type, const value_type&, void*); static bool load_all (index_type&, value_type&, void*); static void delete_all (void*); static void persist (const container_type&, const mysql::binding& id, statements_type&); static void load (container_type&, const mysql::binding& id, statements_type&); static void update (const container_type&, const mysql::binding& id, statements_type&); static void erase (const mysql::binding& id, statements_type&); }; static id_type id (const object_type&); static id_type id (const image_type&); static bool grow (image_type&, my_bool*); static void bind (MYSQL_BIND*, image_type&, mysql::statement_kind); static void bind (MYSQL_BIND*, id_image_type&); static bool init (image_type&, const object_type&, mysql::statement_kind); static void init (object_type&, const image_type&, database&); static void init (id_image_type&, const id_type&); typedef mysql::query query_base_type; struct query_type; struct container_statement_cache_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 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 callback (database&, object_type&, callback_event); static void callback (database&, const object_type&, callback_event); static void persist (database&, 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 query (database&, const query_base_type&); static unsigned long long erase_query (database&, const query_base_type&); public: static bool find_ (mysql::object_statements< object_type >&, const id_type&); static void load_ (mysql::object_statements< object_type >&, object_type&); }; // employer // struct access::object_traits< ::employer >::query_type: query_base_type, query_columns< ::employer, table_name > { query_type (); query_type (bool); query_type (const char*); query_type (const std::string&); query_type (const query_base_type&); }; // position // template <> struct query_columns_base< ::position > { // employee // static const char employee_alias_[]; typedef odb::query_pointer< odb::pointer_query_columns< ::employee, employee_alias_ > > employee_type_ ; static const employee_type_ employee; }; template struct query_columns< ::position, table >: query_columns_base< ::position > { // id // typedef mysql::query_column< mysql::value_traits< long unsigned int, mysql::id_ulonglong >::query_type, mysql::id_ulonglong > id_type_; static const id_type_ id; // title // typedef mysql::query_column< mysql::value_traits< ::std::string, mysql::id_string >::query_type, mysql::id_string > title_type_; static const title_type_ title; }; template const typename query_columns< ::position, table >::id_type_ query_columns< ::position, table >::id (table, "`id`"); template const typename query_columns< ::position, table >::title_type_ query_columns< ::position, table >::title (table, "`title`"); struct access::object_traits< ::position >::query_type: query_base_type, query_columns< ::position, table_name > { query_type (); query_type (bool); query_type (const char*); query_type (const std::string&); query_type (const query_base_type&); }; // project // struct access::object_traits< ::project >::query_type: query_base_type, query_columns< ::project, table_name > { query_type (); query_type (bool); query_type (const char*); query_type (const std::string&); query_type (const query_base_type&); }; // employee // template <> struct query_columns_base< ::employee > { // employer // static const char employer_alias_[]; // position // static const char position_alias_[]; }; template struct query_columns< ::employee, table >: query_columns_base< ::employee > { // id // typedef mysql::query_column< mysql::value_traits< long unsigned int, mysql::id_ulonglong >::query_type, mysql::id_ulonglong > id_type_; static const id_type_ id; // first // typedef mysql::query_column< mysql::value_traits< ::std::string, mysql::id_string >::query_type, mysql::id_string > first_type_; static const first_type_ first; // last // typedef mysql::query_column< mysql::value_traits< ::std::string, mysql::id_string >::query_type, mysql::id_string > last_type_; static const last_type_ last; // employer // typedef mysql::query_column< mysql::value_traits< ::std::string, mysql::id_string >::query_type, mysql::id_string > employer_column_type_; typedef odb::query_pointer< odb::pointer_query_columns< ::employer, employer_alias_ > > employer_pointer_type_; struct employer_type_: employer_pointer_type_, employer_column_type_ { employer_type_ (const char* t, const char* c) : employer_column_type_ (t, c) { } }; static const employer_type_ employer; // position // typedef mysql::query_column< mysql::value_traits< long unsigned int, mysql::id_ulonglong >::query_type, mysql::id_ulonglong > position_column_type_; typedef odb::query_pointer< odb::pointer_query_columns< ::position, position_alias_ > > position_pointer_type_; struct position_type_: position_pointer_type_, position_column_type_ { position_type_ (const char* t, const char* c) : position_column_type_ (t, c) { } }; static const position_type_ position; }; template const typename query_columns< ::employee, table >::id_type_ query_columns< ::employee, table >::id (table, "`id`"); template const typename query_columns< ::employee, table >::first_type_ query_columns< ::employee, table >::first (table, "`first`"); template const typename query_columns< ::employee, table >::last_type_ query_columns< ::employee, table >::last (table, "`last`"); template const typename query_columns< ::employee, table >::employer_type_ query_columns< ::employee, table >::employer (table, "`employer`"); template const typename query_columns< ::employee, table >::position_type_ query_columns< ::employee, table >::position (table, "`position`"); struct access::object_traits< ::employee >::query_type: query_base_type, query_columns< ::employee, table_name > { query_type (); query_type (bool); query_type (const char*); query_type (const std::string&); query_type (const query_base_type&); }; } #include "employee-odb.ixx" // Begin epilogue. // // // End epilogue. #include #endif // EMPLOYEE_ODB_HXX