From 26e36b3a9d7b49d46ecfa69b447482251acba8ac Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 24 Jan 2024 16:53:38 +0300 Subject: Turn libodb repository into package for muti-package repository --- libodb/odb/forward.hxx | 178 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 libodb/odb/forward.hxx (limited to 'libodb/odb/forward.hxx') diff --git a/libodb/odb/forward.hxx b/libodb/odb/forward.hxx new file mode 100644 index 0000000..6f1176d --- /dev/null +++ b/libodb/odb/forward.hxx @@ -0,0 +1,178 @@ +// file : odb/forward.hxx +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ODB_FORWARD_HXX +#define ODB_FORWARD_HXX + +#include + +#include // std::size_t + +#include +#include + +namespace odb +{ + // Common and core namespaces. The idea is that you can use the + // using directive to get database-independent (common) names or + // all core names (core). + // + namespace common {} + + namespace core + { + using namespace common; + } + + // + // + typedef unsigned long long schema_version; + struct schema_version_migration; + + class database; + class connection; + typedef details::shared_ptr connection_ptr; + class transaction; + class statement; + class session; + class section; + template class result; + + namespace common + { + using odb::schema_version; + using odb::schema_version_migration; + using odb::session; + using odb::section; + using odb::result; + } + + namespace core + { + using odb::database; + using odb::connection; + using odb::connection_ptr; + using odb::transaction; + using odb::statement; + } + + // Tracing. + // + class tracer; // Not in core. + extern LIBODB_EXPORT tracer& stderr_tracer; + extern LIBODB_EXPORT tracer& stderr_full_tracer; + + namespace common + { + using odb::stderr_tracer; + } + + // Implementation details. + // + + // Keep real databases first since their enumerators are used as array + // indexes. + // + enum database_id + { + id_mysql, + id_sqlite, + id_pgsql, + id_oracle, + id_mssql, + id_common + }; + + // Number of real databases (i.e., excluding default) in the database_id + // enum. + // + const std::size_t database_count = id_common; + + // Traits. + // + class access + { + public: + template + class object_traits; + + template + class object_traits_impl; + + template + class object_factory; + + template + class view_traits; + + template + class view_traits_impl; + + template + class view_factory; + + template + class pointer_factory; + + template + class composite_value_traits; + + template + class container_traits; + }; + + template + struct object_traits; + + template + struct object_traits_impl; + + template + struct view_traits; + + template + struct view_traits_impl; + + // Cache traits. + // + template struct no_id_pointer_cache_traits; + template struct no_op_pointer_cache_traits; + template struct pointer_cache_traits; + template struct no_id_reference_cache_traits; + template struct no_op_reference_cache_traits; + template struct reference_cache_traits; + + // + // + class query_base; + + template + struct query_column; + + // + // + class result_impl; + class prepared_query_impl; + + // + // + struct multiple_exceptions; + + // Polymorphism support. + // + template + struct polymorphic_map; + + namespace details + { + template <> + struct counter_type + { + typedef shared_base counter; + }; + } +} + +#include + +#endif // ODB_FORWARD_HXX -- cgit v1.1