|
Lightweight 0.20260921.0
|
#include <Primitives.hpp>
Static Public Member Functions | |
| static LIGHTWEIGHT_FORCE_INLINE SQLRETURN | InputParameter (SQLHSTMT stmt, SQLUSMALLINT column, char const &value, SqlDataBinderCallback &cb) noexcept |
| static LIGHTWEIGHT_FORCE_INLINE SQLRETURN | BatchInputParameter (SQLHSTMT stmt, SQLUSMALLINT column, char const *values, size_t rowCount, SqlDataBinderCallback &cb, SQLLEN *indicators=nullptr) noexcept |
| static SQLRETURN | OutputColumn (SQLHSTMT stmt, SQLUSMALLINT column, char *result, SQLLEN *indicator, SqlDataBinderCallback &cb) noexcept |
| static SQLRETURN | GetColumn (SQLHSTMT stmt, SQLUSMALLINT column, char *result, SQLLEN *indicator, SqlDataBinderCallback const &) noexcept |
| static LIGHTWEIGHT_FORCE_INLINE std::string | Inspect (char value) |
Static Public Attributes | |
| static constexpr SqlColumnTypeDefinition | ColumnType = SqlColumnTypeDefinitions::Char { 1 } |
The column type a char maps to. | |
Binds a single char as a one-character CHAR(1) value.
Unlike the numeric primitives, char maps to a character type (SQL_C_CHAR / SQL_CHAR), whose ODBC contract differs from fixed-width data in three ways, each of which this binder honours:
char.Definition at line 104 of file Primitives.hpp.
|
inlinestaticnoexcept |
Binds a single char as an input parameter.
| stmt | The ODBC statement handle. |
| column | The 1-based parameter index. |
| value | The character to bind; it must outlive the statement's execution. |
| cb | Provides the length indicator, which must also outlive the execution. |
SQLBindParameter. Definition at line 116 of file Primitives.hpp.
|
inlinestaticnoexcept |
Binds a contiguous (column-wise) array of characters as an input parameter.
| stmt | The ODBC statement handle. |
| column | The 1-based parameter index. |
| values | The first of rowCount characters; they must outlive the statement's execution. |
| rowCount | The number of rows in the batch. |
| cb | Provides the per-row length indicators when indicators is not given. |
| indicators | Optional per-row indicator array (the length, or SQL_NULL_DATA). When null, every row is bound as one character. |
SQLBindParameter. Definition at line 137 of file Primitives.hpp.
References Lightweight::SqlDataBinderCallback::ProvideInputIndicators().
|
inlinestaticnoexcept |
Binds result as the output column column, filled in on every fetch.
The driver writes into a NUL-terminated staging buffer, which a post-process callback copies into result; a NULL leaves result untouched (std::optional<char> resets itself on it).
| stmt | The ODBC statement handle. |
| column | The 1-based column index. |
| result | Receives the character; it must outlive the fetches. |
| indicator | Receives the length, or SQL_NULL_DATA. |
| cb | Holds the staging buffer and runs the copy after each fetch. |
SQLBindCol. Definition at line 172 of file Primitives.hpp.
|
inlinestaticnoexcept |
Reads the character in column column of the current row.
| stmt | The ODBC statement handle. |
| column | The 1-based column index. |
| result | Receives the character; left untouched on NULL. |
| indicator | Receives the length, or SQL_NULL_DATA. |
SQLGetData. Definition at line 191 of file Primitives.hpp.
|
inlinestatic |
| value | The character to render. |
value as a one-character string. Definition at line 203 of file Primitives.hpp.
|
staticconstexpr |
The column type a char maps to.
Definition at line 107 of file Primitives.hpp.