Lightweight 0.20251202.0
Loading...
Searching...
No Matches
Lightweight::SqlDataBinderCallback Class Referenceabstract

#include <Core.hpp>

Inheritance diagram for Lightweight::SqlDataBinderCallback:
Lightweight::SqlStatement

Public Member Functions

 SqlDataBinderCallback (SqlDataBinderCallback &&)=default
 
 SqlDataBinderCallback (SqlDataBinderCallback const &)=default
 
SqlDataBinderCallbackoperator= (SqlDataBinderCallback &&)=default
 
SqlDataBinderCallbackoperator= (SqlDataBinderCallback const &)=default
 
virtual void PlanPostExecuteCallback (std::function< void()> &&)=0
 
virtual void PlanPostProcessOutputColumn (std::function< void()> &&)=0
 
virtual SQLLEN * ProvideInputIndicator ()=0
 
virtual SQLLEN * ProvideInputIndicators (size_t rowCount)=0
 
virtual SqlServerType ServerType () const noexcept=0
 
virtual std::string const & DriverName () const noexcept=0
 

Detailed Description

Callback interface for SqlDataBinder to allow post-processing of output columns.

This is needed because the SQLBindCol() function does not allow to specify a callback function to be called after the data has been fetched from the database. This is needed to trim strings to the correct size, for example.

Definition at line 31 of file Core.hpp.

Member Function Documentation

◆ PlanPostExecuteCallback()

virtual void Lightweight::SqlDataBinderCallback::PlanPostExecuteCallback ( std::function< void()> &&  )
pure virtual

Plans a callback to be called after the statement has been executed.

See also
SqlDataBinder::PostExecute()

◆ PlanPostProcessOutputColumn()

virtual void Lightweight::SqlDataBinderCallback::PlanPostProcessOutputColumn ( std::function< void()> &&  )
pure virtual

Plans a callback to be called after a column has been processed.

See also
SqlDataBinder::PostProcessOutputColumn()

◆ ProvideInputIndicator()

virtual SQLLEN * Lightweight::SqlDataBinderCallback::ProvideInputIndicator ( )
pure virtual

Provides a pointer to a single indicator for a single input parameter.

Note
The caller is responsible for filling the indicator with the length of the data or SQL_NULL_DATA.
The indicator must remain valid until the statement is executed.
Returns
A pointer to the indicator.

◆ ProvideInputIndicators()

virtual SQLLEN * Lightweight::SqlDataBinderCallback::ProvideInputIndicators ( size_t  rowCount)
pure virtual

Provides a pointer to a contiguous array of indicators for a batch of input parameters.

Note
The caller is responsible for filling the indicators with the lengths of the data or SQL_NULL_DATA.
The indicators must remain valid until the statement is executed.
Parameters
rowCountThe number of rows in the batch.
Returns
A pointer to the first element of the indicator array.

◆ ServerType()

virtual SqlServerType Lightweight::SqlDataBinderCallback::ServerType ( ) const
pure virtualnoexcept
Returns
The server type of the database.

◆ DriverName()

virtual std::string const & Lightweight::SqlDataBinderCallback::DriverName ( ) const
pure virtualnoexcept
Returns
The driver name of the database.

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