Dmitigr Pgfe  1.1beta
The modern C++ API to PostgreSQL
Public Member Functions | List of all members
Parameterizable Class Referenceabstract

Represents an interface of parameterizable types. More...

#include <dmitigr/pgfe/parameterizable.hpp>

Inheritance diagram for Parameterizable:
Prepared_statement Sql_string

Public Member Functions

virtual ~Parameterizable ()=default
 The destructor. More...
 
virtual std::size_t positional_parameter_count () const =0
 
virtual std::size_t named_parameter_count () const =0
 
virtual std::size_t parameter_count () const =0
 
virtual const std::string & parameter_name (std::size_t index) const =0
 
virtual std::optional< std::size_t > parameter_index (const std::string &name) const =0
 
virtual std::size_t parameter_index_throw (const std::string &name) const =0
 
virtual bool has_parameter (const std::string &name) const =0
 
virtual bool has_positional_parameters () const =0
 
virtual bool has_named_parameters () const =0
 
virtual bool has_parameters () const =0
 

Detailed Description

Represents an interface of parameterizable types.

Remarks
The API assumes that named parameters follows after positional parameters.

Constructor & Destructor Documentation

◆ ~Parameterizable()

virtual ~Parameterizable ( )
virtualdefault

The destructor.

Member Function Documentation

◆ has_named_parameters()

virtual bool has_named_parameters ( ) const
pure virtual

◆ has_parameter()

virtual bool has_parameter ( const std::string &  name) const
pure virtual
Returns
bool(parameter_index(name))

◆ has_parameters()

virtual bool has_parameters ( ) const
pure virtual
Returns
(parameter_count() > 0)

◆ has_positional_parameters()

virtual bool has_positional_parameters ( ) const
pure virtual

◆ named_parameter_count()

virtual std::size_t named_parameter_count ( ) const
pure virtual
Returns
The number of named parameters.

◆ parameter_count()

virtual std::size_t parameter_count ( ) const
pure virtual

◆ parameter_index()

virtual std::optional<std::size_t> parameter_index ( const std::string &  name) const
pure virtual
Returns
The parameter index if the parameter with the specified name is present.

◆ parameter_index_throw()

virtual std::size_t parameter_index_throw ( const std::string &  name) const
pure virtual
Returns
parameter_index(name)
Requires
(has_parameter(name))

◆ parameter_name()

virtual const std::string& parameter_name ( std::size_t  index) const
pure virtual
Returns
The name of the parameter by the index.
requires
Index in range [positional_parameter_count(), parameter_count()).

◆ positional_parameter_count()

virtual std::size_t positional_parameter_count ( ) const
pure virtual
Returns
The number of positional parameters.

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