fastcgi++
3.1alpha
A C++ FastCGI/Web API
|
A tuple of parameters to tie to a SQL query. More...
#include <fastcgi++/sql/parameters.hpp>
Public Member Functions | |
void | build () |
Initialize the arrays needed by SQL. More... | |
const unsigned * | oids () const |
Constant pointer to array of all parameter oids. More... | |
const char *const * | raws () const |
Constant pointer to pointer array of all raw parameter data. More... | |
const int * | sizes () const |
Constant pointer to array of all parameter sizes. More... | |
const int * | formats () const |
Constant pointer to array of all formats. More... | |
Protected Attributes | |
const std::vector< unsigned > * | m_oids |
Array of oids for each parameter. More... | |
std::vector< const char * > | m_raws |
Array of raw data pointers for each parameter. More... | |
std::vector< int > | m_sizes |
Array of sizes for each parameter. More... | |
const std::vector< int > * | m_formats |
Array of formats for each parameter. More... | |
Private Member Functions | |
constexpr int | size () const |
How many items in the tuple? More... | |
template<size_t column, size_t... columns> | |
void | build_impl (std::index_sequence< column, columns... >) |
Recursive template SQL array building function. More... | |
template<size_t column> | |
void | build_impl (std::index_sequence< column >) |
Terminating template SQL array building function. More... | |
void | build_impl () |
Template side virtual to populate the above arrays. More... | |
Static Private Attributes | |
static const std::vector< unsigned > | s_oids |
static const std::vector< int > | s_formats |
A tuple of parameters to tie to a SQL query.
This class allows you to pass separate parameters to a SQL query. From the interface perspective this should behave exactly like an std::tuple<Types...>. The differences from std::tuple lie in it's ability to format the tuple data in a way SQL wants to see it.
Types | Pack of types to contain in the tuple. |
Definition at line 443 of file parameters.hpp.
|
inherited |
Initialize the arrays needed by SQL.
Definition at line 36 of file parameters.cpp.
References Fastcgipp::SQL::Parameters_base::build_impl(), Fastcgipp::SQL::Parameters_base::m_raws, Fastcgipp::SQL::Parameters_base::m_sizes, and Fastcgipp::SQL::Parameters_base::size().
|
privatevirtual |
Template side virtual to populate the above arrays.
This just gets called by build().
Implements Fastcgipp::SQL::Parameters_base.
Definition at line 466 of file parameters.hpp.
|
inlineprivate |
Terminating template SQL array building function.
Definition at line 468 of file parameters.hpp.
|
inlineprivate |
Recursive template SQL array building function.
Definition at line 459 of file parameters.hpp.
|
inlineinherited |
Constant pointer to array of all formats.
Definition at line 420 of file parameters.hpp.
|
inlineinherited |
Constant pointer to array of all parameter oids.
This is not valid until build() is called
Definition at line 399 of file parameters.hpp.
|
inlineinherited |
Constant pointer to pointer array of all raw parameter data.
This is not valid until build() is called
Definition at line 408 of file parameters.hpp.
|
inlineconstexprprivatevirtual |
How many items in the tuple?
Implements Fastcgipp::SQL::Parameters_base.
Definition at line 452 of file parameters.hpp.
|
inlineinherited |
Constant pointer to array of all parameter sizes.
Definition at line 414 of file parameters.hpp.
|
protectedinherited |
Array of formats for each parameter.
This gets initialized by calling build(). It is really just an array of 1s.
Definition at line 383 of file parameters.hpp.
|
protectedinherited |
Array of oids for each parameter.
This gets initialized by calling build().
Definition at line 364 of file parameters.hpp.
|
protectedinherited |
Array of raw data pointers for each parameter.
This gets initialized by calling build().
Definition at line 370 of file parameters.hpp.
Referenced by Fastcgipp::SQL::Parameters_base::build().
|
protectedinherited |
Array of sizes for each parameter.
This gets initialized by calling build().
Definition at line 376 of file parameters.hpp.
Referenced by Fastcgipp::SQL::Parameters_base::build().
|
staticprivate |
Definition at line 449 of file parameters.hpp.
|
staticprivate |
Definition at line 448 of file parameters.hpp.