|
nanodbc
A small C++ wrapper for the native C ODBC API
|
Binds given values to given parameter placeholder number in the prepared statement. More...

Functions | |
| template<class T > | |
| void | nanodbc::table_valued_parameter::bind (short param_index, T const *values, std::size_t batch_size) |
| Binds multiple values. | |
| template<class T > | |
| void | nanodbc::table_valued_parameter::bind (short param_index, T const *values, std::size_t batch_size, T const *null_sentry) |
| Binds multiple values. | |
| template<class T > | |
| void | nanodbc::table_valued_parameter::bind (short param_index, T const *values, std::size_t batch_size, bool const *nulls) |
| Binds multiple values. | |
| void | nanodbc::table_valued_parameter::bind (short param_index, std::vector< std::vector< uint8_t > > const &values) |
| Binds multiple values. | |
| void | nanodbc::table_valued_parameter::bind (short param_index, std::vector< std::vector< uint8_t > > const &values, bool const *nulls) |
| Binds multiple values. | |
| void | nanodbc::table_valued_parameter::bind (short param_index, std::vector< std::vector< uint8_t > > const &values, uint8_t const *null_sentry) |
| Binds multiple values. | |
| template<class T > | |
| void | nanodbc::statement::bind (short param_index, T const *values, std::size_t batch_size, param_direction direction=PARAM_IN) |
| Binds multiple values. | |
| template<class T > | |
| void | nanodbc::statement::bind (short param_index, T const *values, std::size_t batch_size, T const *null_sentry, param_direction direction=PARAM_IN) |
| Binds multiple values. | |
| template<class T > | |
| void | nanodbc::statement::bind (short param_index, T const *values, std::size_t batch_size, bool const *nulls, param_direction direction=PARAM_IN) |
| Binds multiple values. | |
| void | nanodbc::statement::bind (short param_index, std::vector< std::vector< uint8_t > > const &values, param_direction direction=PARAM_IN) |
| Binds multiple values. | |
| void | nanodbc::statement::bind (short param_index, std::vector< std::vector< uint8_t > > const &values, bool const *nulls, param_direction direction=PARAM_IN) |
| Binds multiple values. | |
| void | nanodbc::statement::bind (short param_index, std::vector< std::vector< uint8_t > > const &values, uint8_t const *null_sentry, param_direction direction=PARAM_IN) |
| Binds multiple values. | |
| template<class T > | |
| void | nanodbc::statement::bind (short param_index, std::vector< T > const &values, param_direction direction=PARAM_IN) |
| Binds multiple values, holding a copy of them. | |
| template<class T > | |
| void | nanodbc::statement::bind (short param_index, std::vector< T > const &values, bool const *nulls, param_direction direction=PARAM_IN) |
| Binds multiple values, holding a copy of them. | |
| template<class T > | |
| void | nanodbc::statement::bind (short param_index, std::vector< std::optional< T > > const &values, param_direction direction=PARAM_IN) |
| Binds a batch of values, any of which may be absent and bound as null. | |
Binds given values to given parameter placeholder number in the prepared statement.
If your prepared SQL query has any parameter markers, ? (question mark) placeholders, this is how you bind values to them. Parameter markers are numbered using Zero-based index from left to right.
It is possible to use these functions for batch operations.
| param_index | Zero-based index of parameter marker (placeholder position). |
| values | Values to substitute into placeholder. |
| batch_size | The number of values being bound. batch_size should greater or equal than row_count |
| null_sentry | Value which should represent a null value. |
| nulls | Flags for values that should be set to a null value. |
| param_direction | ODBC parameter direction. |
| database_error |
If your prepared SQL query has any parameter markers, ? (question mark) placeholders, this is how you bind values to them. Parameter markers are numbered using Zero-based index from left to right.
It is possible to use these functions for batch operations.
| param_index | Zero-based index of parameter marker (placeholder position). |
| values | Values to substitute into placeholder. |
| batch_size | The number of values being bound. |
| null_sentry | Value which should represent a null value. |
| nulls | Flags for values that should be set to a null value. |
| param_direction | ODBC parameter direction. |
| database_error |
| void nanodbc::table_valued_parameter::bind | ( | short | param_index, |
| T const * | values, | ||
| std::size_t | batch_size | ||
| ) |
Binds multiple values.
| void nanodbc::table_valued_parameter::bind | ( | short | param_index, |
| T const * | values, | ||
| std::size_t | batch_size, | ||
| T const * | null_sentry | ||
| ) |
Binds multiple values.
| void nanodbc::table_valued_parameter::bind | ( | short | param_index, |
| T const * | values, | ||
| std::size_t | batch_size, | ||
| bool const * | nulls | ||
| ) |
Binds multiple values.
| void nanodbc::table_valued_parameter::bind | ( | short | param_index, |
| std::vector< std::vector< uint8_t > > const & | values | ||
| ) |
Binds multiple values.
| void nanodbc::table_valued_parameter::bind | ( | short | param_index, |
| std::vector< std::vector< uint8_t > > const & | values, | ||
| bool const * | nulls | ||
| ) |
Binds multiple values.
| void nanodbc::table_valued_parameter::bind | ( | short | param_index, |
| std::vector< std::vector< uint8_t > > const & | values, | ||
| uint8_t const * | null_sentry | ||
| ) |
Binds multiple values.
| void nanodbc::statement::bind | ( | short | param_index, |
| T const * | values, | ||
| std::size_t | batch_size, | ||
| param_direction | direction = PARAM_IN |
||
| ) |
Binds multiple values.
| void nanodbc::statement::bind | ( | short | param_index, |
| T const * | values, | ||
| std::size_t | batch_size, | ||
| T const * | null_sentry, | ||
| param_direction | direction = PARAM_IN |
||
| ) |
Binds multiple values.
| void nanodbc::statement::bind | ( | short | param_index, |
| T const * | values, | ||
| std::size_t | batch_size, | ||
| bool const * | nulls, | ||
| param_direction | direction = PARAM_IN |
||
| ) |
Binds multiple values.
| void nanodbc::statement::bind | ( | short | param_index, |
| std::vector< std::vector< uint8_t > > const & | values, | ||
| param_direction | direction = PARAM_IN |
||
| ) |
Binds multiple values.
| void nanodbc::statement::bind | ( | short | param_index, |
| std::vector< std::vector< uint8_t > > const & | values, | ||
| bool const * | nulls, | ||
| param_direction | direction = PARAM_IN |
||
| ) |
Binds multiple values.
| void nanodbc::statement::bind | ( | short | param_index, |
| std::vector< std::vector< uint8_t > > const & | values, | ||
| uint8_t const * | null_sentry, | ||
| param_direction | direction = PARAM_IN |
||
| ) |
Binds multiple values.
| void nanodbc::statement::bind | ( | short | param_index, |
| std::vector< T > const & | values, | ||
| param_direction | direction = PARAM_IN |
||
| ) |
Binds multiple values, holding a copy of them.
The overloads taking a pointer bind the caller's buffer, which has to stay alive and unchanged until the statement has been executed. These take a copy instead, so the vector is free to go out of scope.
| void nanodbc::statement::bind | ( | short | param_index, |
| std::vector< T > const & | values, | ||
| bool const * | nulls, | ||
| param_direction | direction = PARAM_IN |
||
| ) |
Binds multiple values, holding a copy of them.
|
inline |
Binds a batch of values, any of which may be absent and bound as null.
Where the overload taking a flags array asks the caller to keep the values and the flags in step, this reads both out of the one vector. The values are copied, so the vector is free to go out of scope before the statement is executed.
| param_index | Zero-based index of parameter marker (placeholder position). |
| values | The values to bind, an absent one binding null. |
| direction | ODBC parameter direction. |
| database_error |