diff --git a/docs/howto.md b/docs/howto.md index 0271d8bc9..7f96c5e96 100644 --- a/docs/howto.md +++ b/docs/howto.md @@ -40,7 +40,7 @@ int main() { // Request with connection provider, query and callback. // Provider binds how to get connection with io_context. - ozo::request(ozo::make_provider(io, conn_info), query, ozo::into(rows), + ozo::request(ozo::make_connector(io, conn_info), query, ozo::into(rows), [&](ozo::error_code ec, auto conn) { if (ec) { // Here we got an error, so we can get: diff --git a/docs/html/annotated.html b/docs/html/annotated.html index f2f206d18..d2d8cfea1 100644 --- a/docs/html/annotated.html +++ b/docs/html/annotated.html @@ -108,24 +108,21 @@
boost::hana::map
| |
default_delete< PGconn > (std) | |
default_delete< PGresult > (std) | |
| |
fetch_context (ozo::impl) | |
| |
| |
is_array (ozo) | |
is_built_in (ozo) | |
is_composite (ozo) | |
is_nullable< boost::optional< T > > (ozo) | |
is_string (ozo) | |
| |
oid_map_t (ozo) | |
| |
type_traits_helper (ozo) | |
(Note that these are not member functions.)
ozo::connection_info
ConnectionSource. More... There the oid_map
must be a reference or proxy for connection's oid map object, which allows to read and modify it. Object must be created via ozo::register_types()
template function or be empty_oid_map in case if no custom types are used with the connection.
There the oid_map
must be a reference or proxy for connection's OidMap object, which allows to read and modify it. Object must be created via ozo::register_types()
template function or be empty_oid_map in case if no custom types are used with the connection.
Must return reference or proxy for a socket IO stream object which allows to bind the connection to the asio io_context, currently boost::asio::posix::stream_descriptor is suppurted only.
Must return reference or proxy for native_conn_handle object
Must return reference or proxy for timer to plan operations cancel by timeout. Should provide boost::asio::basic_waitable_timer like interface.
diff --git a/docs/html/group__group-connection-functions.html b/docs/html/group__group-connection-functions.html index 04bfec3d3..246c71fa4 100644 --- a/docs/html/group__group-connection-functions.html +++ b/docs/html/group__group-connection-functions.html @@ -197,7 +197,7 @@ozo::connection_info
ConnectionSource. More...Get the connection oid map object.
-Connection types' OID map getter. This function must be specified for a Connection concept implementation to be conform to. Function must return reference to ozo::oid_map_t template specialization or proxy class object to access connection's types' OID map.
+Connection types' OID map getter. This function must be specified for a Connection concept implementation to be conform to. Function must return reference to ozo::oid_map_t template specialization or proxy class object to access connection's types' OID map.
Customization Point
This is customization point for Connection concept implementation. To customize it please specialize ozo::get_connection_oid_map_impl
template. Default specialization may look like this (for exposition only
):
Function overload works as well, but it is safer to specialize the template.
@@ -175,15 +171,13 @@ using | null_oid_t = std::integral_constant< oid_t, 0 > | |
Type for non initialized OID. | ||
template<typename T > | ||
using | is_fusion_adapted = std::integral_constant< bool, boost::fusion::traits::is_sequence< T >::value > | |
template<typename T > | ||
using | is_hana_adapted = std::integral_constant< bool, hana::Sequence< T >::value||hana::Struct< T >::value > | |
template<std::size_t n> | ||
using | bytes = std::integral_constant< std::size_t, n > | |
+using | empty_oid_map = std::decay_t< decltype(register_types<>())> | |
Type alias for empty OidMap. | ||
Functions | |
void | close_connection (T &&conn) |
Close connection to the database immediately. More... | |
template<typename P , typename Q , typename CompletionToken , typename = Require<ConnectionProvider<P>>> | |
auto | execute (P &&provider, Q &&query, CompletionToken &&token) |
Executes query but does not return a resultThis function is same as ozo::request() function except it does not return any result. It suitable to use with UPDATE INSERT statements, or invoking procedures without result. More... | |
template<typename P , typename Q , typename CompletionToken , typename = Require<ConnectionProvider<P>>> | |
auto | execute (P &&provider, Q &&query, const time_traits::duration &timeout, CompletionToken &&token) |
Executes query but does not return a resultThis function is same as ozo::request() function except it does not return any result. It suitable to use with UPDATE INSERT statements, or invoking procedures without result. More... | |
template<typename P , typename Q , typename Out , typename CompletionToken , typename = Require<ConnectionProvider<P>>> | |
auto | request (P &&provider, Q &&query, const time_traits::duration &timeout, Out out, CompletionToken &&token) |
Send request to a database and provides query result (time-out version). @@ -302,15 +296,25 @@ | |
template<typename T > | |
constexpr auto | size_of (T &&) noexcept -> typename std::enable_if< !is_dynamic_size< std::decay_t< T >>::value, typename type_traits< std::decay_t< T >>::size >::type |
template<typename T , typename MapImplT > | |
void | set_type_oid (oid_map_t< MapImplT > &map, oid_t oid) noexcept |
template<typename T , typename MapImplT > | |
auto | type_oid (const oid_map_t< MapImplT > &map) noexcept -> std::enable_if_t<!is_built_in< T >::value, oid_t > |
template<typename T , typename MapImplT > | |
bool | accepts_oid (const oid_map_t< MapImplT > &map, oid_t oid) noexcept |
template<typename ... T> | |
decltype(auto) constexpr | register_types () noexcept |
Provides OidMap implementation for user-defined types. More... | |
template<typename T , typename MapImplT > | |
void | set_type_oid (oid_map_t< MapImplT > &map, oid_t oid) noexcept |
template<typename T , typename MapImplT > | |
auto | type_oid (const oid_map_t< MapImplT > &map) noexcept -> std::enable_if_t<!is_built_in< T >::value, oid_t > |
template<typename T , typename MapImplT > | |
bool | accepts_oid (const oid_map_t< MapImplT > &map, oid_t oid) noexcept |
template<typename T , typename MapImplT > | |
bool | accepts_oid (const oid_map_t< MapImplT > &map, const T &, oid_t oid) noexcept |
template<typename MapImplT > | |
constexpr bool | empty (const oid_map_t< MapImplT > &map) noexcept |
Variables | |
template<typename T > | |
constexpr auto | RawDataWritable |
Raw Data Writable concept. More... | |
RawDataWritable concept. More... | |
template<typename T > | |
constexpr auto | Emplaceable |
constexpr auto | Nullable |
Indicates if type meets nullable requirements. More... | |
template<typename T > | |
constexpr auto | OidMap |
Map of C++ types to corresponding PostgreSQL types OIDs. More... | |
Useful shortcuts for typed unnamed results containers
@@ -413,121 +421,9 @@Helpers to make size trait constant bytes - makes fixed size trait dynamic_size - makes dynamis size trait
-using ozo::is_fusion_adapted = typedef std::integral_constant<bool, boost::fusion::traits::is_sequence<T>::value > | -
Indicates if type is adapted for introspection with Boost.Fusion
- -using ozo::is_hana_adapted = typedef std::integral_constant<bool, hana::Sequence<T>::value || hana::Struct<T>::value > | -
Indicates if type is adapted for introspection with Boost.Hana
-
-
|
- -noexcept | -
Function returns true if type can be obtained from DB response with specified oid.
- -
-
|
- -noexcept | -
Function sets oid for type in oid map.
- -Function returns type name in Postgre SQL. For custom types user must define this name.
- - - -
-
|
- -noexcept | -
Function returns oid for type from oid map.
-Inherits integral_constant< bool, !std::is_same_v< type_traits< T >::oid, null_oid_t > >.
+Inherits bool_constant< !std::is_same_v< type_traits< T >::oid, null_oid_t > >.
This is the complete list of members for ozo::oid_map_t< ImplT >, including all inherited members.
+#include <type_traits.h>
OidMap implementation type.
+This type implements OidMap concept based on boost::hana::map
.
ozo::type_traits_helper
Inherits ozo::type_traits_helper< T, void >.
Name | — type which can be converted into a string representation which contain the fully qualified type name in DB |