Orbit Framework
An ultra-modern, asynchronous, cross-platform C++ Web Framework.
Loading...
Searching...
No Matches
database Namespace Reference

Classes

struct  ConnectAwaiter
 A coroutine awaiter for connecting a PostgresClient asynchronously. More...
 
class  ConnectionPool
 A thread-safe connection pool for managing reusable database client connections. More...
 
class  MongoClient
 An asynchronous MongoDB client using coroutines. More...
 
class  MysqlClient
 An asynchronous MySQL client using coroutines and a network Proactor. More...
 
class  PostgresClient
 An asynchronous PostgreSQL client using libpq and a network Proactor. More...
 
struct  QueryAwaiter
 A coroutine awaiter for executing a query on a PostgresClient asynchronously. More...
 
class  RedisClient
 A synchronous Redis client providing core operations. More...
 
class  ResultSet
 Represents a generic, unified result set from a database query. More...
 
class  Row
 Represents a single row of a database result set. More...
 

Functions

ConnectAwaiter connect_async (std::shared_ptr< PostgresClient > client)
 Creates an awaiter for connecting a PostgresClient.
 
QueryAwaiter query_async (std::shared_ptr< PostgresClient > client, const std::string &sql)
 Creates an awaiter for executing a query on a PostgresClient.
 

Function Documentation

◆ connect_async()

ConnectAwaiter database::connect_async ( std::shared_ptr< PostgresClient client)
inline

Creates an awaiter for connecting a PostgresClient.

Parameters
clientA shared pointer to the PostgresClient.
Returns
A ConnectAwaiter that can be co_awaited.

◆ query_async()

QueryAwaiter database::query_async ( std::shared_ptr< PostgresClient client,
const std::string &  sql 
)
inline

Creates an awaiter for executing a query on a PostgresClient.

Parameters
clientA shared pointer to the PostgresClient.
sqlThe SQL query string to execute.
Returns
A QueryAwaiter that can be co_awaited for the result.
auto result = co_await query_async(client, "SELECT * FROM items");
QueryAwaiter query_async(std::shared_ptr< PostgresClient > client, const std::string &sql)
Creates an awaiter for executing a query on a PostgresClient.
Definition PostgresCoro.hpp:65