Cppgres
Build Postgres extensions in C++
Loading...
Searching...
No Matches
cppgres::spi_executor Struct Reference

SPI executor API More...

#include <executor.hpp>

Inheritance diagram for cppgres::spi_executor:
cppgres::executor cppgres::spi_nonatomic_executor

Classes

struct  result_iterator
 
struct  results
 

Public Member Functions

 spi_executor ()
 Creates an SPI executor.
 
template<datumable_tuple Ret, convertible_into_nullable_datum_and_has_a_type... Args>
results< Ret, Args... > query (std::string_view query, Args &&...args)
 Queries using a string view.
 
template<convertible_into_nullable_datum_and_has_a_type... Args>
spi_plan< Args... > plan (std::string_view query)
 
template<datumable_tuple Ret, convertible_into_nullable_datum... Args>
results< Ret, Args... > query (spi_plan< Args... > &query, Args &&...args)
 
template<convertible_into_nullable_datum_and_has_a_type... Args>
uint64_t execute (std::string_view query, Args &&...args)
 

Protected Member Functions

 spi_executor (int flags)
 

Static Protected Attributes

static std::stack< spi_executor * > executors
 

Detailed Description

SPI executor API

Member Function Documentation

◆ query()

template<datumable_tuple Ret, convertible_into_nullable_datum_and_has_a_type... Args>
results< Ret, Args... > cppgres::spi_executor::query ( std::string_view  query,
Args &&...  args 
)
inline

Queries using a string view.

Returns
Iterable cppgres::spi_executor::results, can be a single value
Exceptions
std::runtime_errorif there's another SPI executor in scope
std::runtime_errorif there's an SPI error

The documentation for this struct was generated from the following file: