SPI executor API
More...
#include <executor.hpp>
|
|
| spi_executor () |
| | Creates an SPI executor.
|
| |
| template<typename Ret , convertible_into_nullable_datum_and_has_a_type... Args> |
| results< Ret > | query (utils::convertible_to_cstring auto query, Args &&...args) |
| | Queries using a string view.
|
| |
| template<typename Ret , convertible_into_nullable_datum_and_has_a_type... Args> |
| results< Ret > | query (utils::convertible_to_cstring auto query, options &&opts, Args &&...args) |
| | Queries using a string view.
|
| |
|
template<convertible_into_nullable_datum_and_has_a_type... Args> |
| spi_plan< Args... > | plan (utils::convertible_to_cstring auto query) |
| |
|
template<typename Ret , convertible_into_nullable_datum... Args> |
| results< Ret > | query (spi_plan< Args... > &query, Args &&...args) |
| |
|
template<typename Ret , convertible_into_nullable_datum... Args> |
| results< Ret > | query (spi_plan< Args... > &query, options &&opts, Args &&...args) |
| |
|
template<convertible_into_nullable_datum_and_has_a_type... Args> |
| uint64_t | execute (std::string_view query, Args &&...args) |
| |
|
template<convertible_into_nullable_datum_and_has_a_type... Args> |
| uint64_t | execute (std::string_view query, options &&opts, Args &&...args) |
| |
◆ query() [1/2]
template<typename Ret , convertible_into_nullable_datum_and_has_a_type... Args>
| results< Ret > cppgres::spi_executor::query |
( |
utils::convertible_to_cstring auto |
query, |
|
|
Args &&... |
args |
|
) |
| |
|
inline |
Queries using a string view.
- Parameters
-
| query | Query string |
| args | Query arguments |
- Note
- if you need to be able to configure the execution, use another version of the function with cppgres::spi_executor::options argument
- Returns
- Iterable cppgres::spi_executor::results, can be a single value
- Exceptions
-
| std::runtime_error | if there's another SPI executor in scope |
| std::runtime_error | if there's an SPI error |
◆ query() [2/2]
template<typename Ret , convertible_into_nullable_datum_and_has_a_type... Args>
| results< Ret > cppgres::spi_executor::query |
( |
utils::convertible_to_cstring auto |
query, |
|
|
options && |
opts, |
|
|
Args &&... |
args |
|
) |
| |
|
inline |
Queries using a string view.
- Parameters
-
| query | Query string |
| opts | Execution options |
| args | Query arguments |
- Returns
- Iterable cppgres::spi_executor::results, can be a single value
- Exceptions
-
| std::runtime_error | if there's another SPI executor in scope |
| std::runtime_error | if there's an SPI error |
The documentation for this struct was generated from the following file: