9 #define SOCI_DB2_SOURCE 23 this->position = position;
32 size =
sizeof(char) + 1;
40 size = statement_.column_size(this->position);
52 size =
sizeof(SQLINTEGER);
55 cType = SQL_C_SBIGINT;
56 size =
sizeof(
long long);
59 cType = SQL_C_UBIGINT;
60 size =
sizeof(
unsigned long long);
64 size =
sizeof(double);
67 cType = SQL_C_TYPE_TIMESTAMP;
68 size =
sizeof(TIMESTAMP_STRUCT);
73 cType = SQL_C_UBIGINT;
74 size =
sizeof(
unsigned long long);
77 throw soci_error(
"Into element used with non-supported type.");
82 SQLRETURN cliRC = SQLBindCol(statement_.hStmt, static_cast<SQLUSMALLINT>(this->position),
83 static_cast<SQLUSMALLINT>(cType), data, size, &valueLen);
84 if (cliRC != SQL_SUCCESS)
96 bool gotData,
bool calledFromFetch,
indicator * ind)
98 if (calledFromFetch ==
true && gotData ==
false)
108 if (SQL_NULL_DATA == valueLen)
113 "Null value fetched and no indicator defined.");
130 char *c =
static_cast<char*
>(data);
135 std::string *s =
static_cast<std::string *
>(data);
139 throw soci_error(
"Buffer size overflow; maybe got too large string");
144 std::tm *t =
static_cast<std::tm *
>(data);
146 TIMESTAMP_STRUCT * ts =
reinterpret_cast<TIMESTAMP_STRUCT*
>(buf);
148 t->tm_year = ts->year - 1900;
149 t->tm_mon = ts->month - 1;
150 t->tm_mday = ts->day;
151 t->tm_hour = ts->hour;
152 t->tm_min = ts->minute;
153 t->tm_sec = ts->second;
void define_by_pos(int &position, void *data, details::exchange_type type)
const std::size_t cli_max_buffer
void post_fetch(bool gotData, bool calledFromFetch, indicator *ind)