// This file was generated by ODB, object-relational mapping (ORM) // compiler for C++. // #ifndef CATEGORY_ODB_HXX #define CATEGORY_ODB_HXX #include #if (ODB_VERSION != 20300UL) #error ODB runtime version mismatch #endif #include // Begin prologue. // #include #if ODB_QT_VERSION != 2030000 // 2.3.0 # error ODB and C++ compilers see different libodb-qt interface versions #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // // End prologue. #include "Category.hpp" #include #include #include #include #include #include #include #include #include #include #include #include #include namespace odb { // Category // template <> struct class_traits< ::Category > { static const class_kind kind = class_object; }; template <> class access::object_traits< ::Category > { public: typedef ::Category object_type; typedef ::QSharedPointer< ::Category > pointer_type; typedef odb::pointer_traits pointer_traits; static const bool polymorphic = false; typedef ::quint8 id_type; static const bool auto_id = true; static const bool abstract = false; static id_type id (const object_type&); typedef no_op_pointer_cache_traits pointer_cache_traits; typedef no_op_reference_cache_traits reference_cache_traits; static void callback (database&, object_type&, callback_event); static void callback (database&, const object_type&, callback_event); }; } #include #include #include #include #include #include namespace odb { // Category // template struct query_columns< ::Category, id_sqlite, A > { // id // typedef sqlite::query_column< sqlite::value_traits< ::quint8, sqlite::id_integer >::query_type, sqlite::id_integer > id_type_; static const id_type_ id; // name // typedef sqlite::query_column< sqlite::value_traits< ::QString, sqlite::id_text >::query_type, sqlite::id_text > name_type_; static const name_type_ name; }; template const typename query_columns< ::Category, id_sqlite, A >::id_type_ query_columns< ::Category, id_sqlite, A >:: id (A::table_name, "\"id\"", 0); template const typename query_columns< ::Category, id_sqlite, A >::name_type_ query_columns< ::Category, id_sqlite, A >:: name (A::table_name, "\"name\"", 0); template struct pointer_query_columns< ::Category, id_sqlite, A >: query_columns< ::Category, id_sqlite, A > { }; template <> class access::object_traits_impl< ::Category, id_sqlite >: public access::object_traits< ::Category > { public: struct id_image_type { long long id_value; bool id_null; std::size_t version; }; struct image_type { // m_id // long long m_id_value; bool m_id_null; // m_name // details::buffer m_name_value; std::size_t m_name_size; bool m_name_null; std::size_t version; }; struct extra_statement_cache_type; using object_traits::id; static id_type id (const image_type&); static bool grow (image_type&, bool*); static void bind (sqlite::bind*, image_type&, sqlite::statement_kind); static void bind (sqlite::bind*, id_image_type&); static bool init (image_type&, const object_type&, sqlite::statement_kind); static void init (object_type&, const image_type&, database*); static void init (id_image_type&, const id_type&); typedef sqlite::object_statements statements_type; typedef sqlite::query_base query_base_type; static const std::size_t column_count = 2UL; 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&, 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_ (statements_type&, const id_type*); static void load_ (statements_type&, object_type&, bool reload); }; template <> class access::object_traits_impl< ::Category, id_common >: public access::object_traits_impl< ::Category, id_sqlite > { }; // Category // } #include "Category-odb.ixx" #include #endif // CATEGORY_ODB_HXX