|
Orbit Framework
An ultra-modern, asynchronous, cross-platform C++ Web Framework.
|
An asynchronous MongoDB client using coroutines. More...
#include <MongoClient.hpp>
Classes | |
| struct | Config |
| Configuration options for the MongoDB client. More... | |
| struct | InsertAwaiter |
| struct | QueryAwaiter |
| struct | QueryResult |
Public Member Functions | |
| MongoClient (concurrency::ThreadPool &thread_pool, const Config &config) | |
| Constructs a new MongoClient. | |
| ~MongoClient () | |
| MongoClient (const MongoClient &)=delete | |
| MongoClient & | operator= (const MongoClient &)=delete |
| QueryAwaiter | find_async (std::string query_json) |
| Executes a find query asynchronously. | |
| InsertAwaiter | insert_async (std::string doc_json) |
| Inserts a document asynchronously. | |
| concurrency::ThreadPool & | get_thread_pool () |
| Gets the associated thread pool. | |
| mongoc_client_pool_t * | get_pool () |
| Gets the underlying MongoDB client pool. | |
| const Config & | get_config () const |
| Gets the configuration used by this client. | |
An asynchronous MongoDB client using coroutines.
| database::MongoClient::MongoClient | ( | concurrency::ThreadPool & | thread_pool, |
| const Config & | config | ||
| ) |
Constructs a new MongoClient.
| thread_pool | The thread pool to use for asynchronous operations. |
| config | The configuration settings for the MongoDB client. |
| database::MongoClient::~MongoClient | ( | ) |
|
delete |
| MongoClient::QueryAwaiter database::MongoClient::find_async | ( | std::string | query_json | ) |
Executes a find query asynchronously.
| query_json | The JSON string representing the query. |
|
inline |
Gets the configuration used by this client.
|
inline |
Gets the underlying MongoDB client pool.
|
inline |
Gets the associated thread pool.
| MongoClient::InsertAwaiter database::MongoClient::insert_async | ( | std::string | doc_json | ) |
Inserts a document asynchronously.
| doc_json | The JSON string representing the document to insert. |
|
delete |