Asynchronous database interface wrapper.
More...
#include <async_operations.h>
Asynchronous database interface wrapper.
Definition at line 275 of file async_operations.h.
◆ async_database()
◆ begin_transaction_async()
| async_result< bool > database::async::async_database::begin_transaction_async |
( |
| ) |
|
|
inline |
◆ commit_transaction_async()
| async_result< bool > database::async::async_database::commit_transaction_async |
( |
| ) |
|
|
inline |
◆ connect_async()
| async_result< bool > database::async::async_database::connect_async |
( |
const std::string & | connection_string | ) |
|
|
inline |
◆ disconnect_async()
| async_result< bool > database::async::async_database::disconnect_async |
( |
| ) |
|
|
inline |
◆ execute_async()
| async_result< bool > database::async::async_database::execute_async |
( |
const std::string & | query | ) |
|
|
inline |
◆ execute_batch_async()
| async_result< std::vector< bool > > database::async::async_database::execute_batch_async |
( |
const std::vector< std::string > & | queries | ) |
|
|
inline |
◆ rollback_transaction_async()
| async_result< bool > database::async::async_database::rollback_transaction_async |
( |
| ) |
|
|
inline |
◆ select_async()
◆ select_batch_async()
- Examples
- /home/runner/work/database_system/database_system/database/async/async_operations.h.
Definition at line 786 of file async_operations.h.
788 {
790 auto queries_copy = queries;
791 auto future =
executor_->submit([db, queries_copy]() -> std::vector<core::database_result> {
792 std::vector<core::database_result> results;
793 results.reserve(queries_copy.size());
794 for (const auto& q : queries_copy) {
795 auto result = db->select_query(q);
796 if (result.is_ok()) {
797 results.push_back(result.value());
798 } else {
800 }
801 }
802 return results;
803 });
804 return async_result<std::vector<core::database_result>>(std::move(future));
805 }
References db_, and executor_.
◆ db_
◆ executor_
| std::shared_ptr<async_executor> database::async::async_database::executor_ |
|
private |
The documentation for this class was generated from the following file: