The structure used to hold the binding information. More...
Public Member Functions | |
bind_info_t () | |
The constructor used to initialize the info. | |
Public Attributes | |
union { | |
std::string * f_string | |
std::wstring * f_wstring | |
}; | |
SQLSMALLINT | f_col |
Holds the column index. | |
SQLPOINTER | f_data |
The pointer to your variable. | |
smartptr< buffer_char_t > | f_data_buffer |
The buffer used to hold dynamically allocated data pointers. | |
SQLLEN | f_fetch_size |
The number of bytes the last fetch() command read. | |
bool * | f_is_null |
A pointer to a variable defining whether a column is null. | |
std::string | f_name |
Holds the name of the column. | |
SQLULEN | f_size |
The number of bytes in this variable buffer. | |
SQLSMALLINT | f_target_type |
The expected type of the column. |
The structure used to hold the binding information.
This structure stores the binding information for each column you are interested in this record.
It includes the name, index, data type and a pointer to your variable.
Definition at line 179 of file record.h.
odbcpp::record::bind_info_t::bind_info_t | ( | ) | [inline] |
union { ... } |
Holds the column index.
This index is used to bind the column to your variable.
If the name is defined, then f_name is used instead.
Definition at line 194 of file record.h.
Referenced by odbcpp::record::bind().
The pointer to your variable.
In most cases, this is the pointer to your variable. The only two exceptions at this time are the string and wstring types.
This pointer is never freed. It has to be done by you. Do not free your variable until after you are done with calls to the statement::fetch() function.
Definition at line 196 of file record.h.
Referenced by odbcpp::record::bind(), odbcpp::record::bind_impl(), and odbcpp::record::finalize_info().
The buffer used to hold dynamically allocated data pointers.
This variable is allocated only when a dynamically allocated data buffer is necessary. This is the case for the string and wstring types.
Definition at line 200 of file record.h.
Referenced by odbcpp::record::bind_impl().
The number of bytes the last fetch() command read.
This value represents the exact size of the variable buffer that has been defined by the last fetch() command.
Definition at line 198 of file record.h.
Referenced by odbcpp::record::bind_impl(), and odbcpp::record::finalize_info().
A pointer to a variable defining whether a column is null.
This variable is set by the statement::fetch() call. Whenever the column is undefined (null), the boolean pointed by f_is_null is set to true. Otherwise it is set to false.
The binding of the variable has no effect on its content. It will be changed only by a call to fetch().
Definition at line 199 of file record.h.
Referenced by odbcpp::record::bind(), and odbcpp::record::finalize_info().
Holds the name of the column.
This name is used to bind the column to your variable.
If the name is not defined, then f_col is used instead.
Definition at line 193 of file record.h.
Referenced by odbcpp::record::bind().
The number of bytes in this variable buffer.
This value represents the exact size of the variable buffer in bytes. The fetch() command will never write more data to your variable.
Definition at line 197 of file record.h.
Referenced by odbcpp::record::bind(), odbcpp::record::bind_impl(), and odbcpp::record::finalize_info().
A pointer to the caller string.
This variable holds a pointer to the user string. It is used in the finalize() function to copy the string read with fetch() in the caller string.
Definition at line 202 of file record.h.
Referenced by odbcpp::record::bind(), and odbcpp::record::finalize_info().
The expected type of the column.
This value represents the type of the column such as SQL_C_SHORT or SQL_C_TIMESTAMP.
Definition at line 195 of file record.h.
Referenced by odbcpp::record::bind(), odbcpp::record::bind_impl(), and odbcpp::record::finalize_info().
A pointer to the caller string.
This variable holds a pointer to the user string. It is used in the finalize() function to copy the string read with fetch() in the caller string.
Definition at line 203 of file record.h.
Referenced by odbcpp::record::bind(), and odbcpp::record::finalize_info().