MCPcopy Create free account
hub / github.com/SOCI/soci / statementType

Function statementType

src/backends/firebird/statement.cpp:150–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148namespace
149{
150 int statementType(isc_stmt_handle stmt)
151 {
152 int stype;
153 int length;
154 char type_item[] = {isc_info_sql_stmt_type};
155 char res_buffer[8];
156
157 ISC_STATUS stat[ISC_STATUS_LENGTH];
158
159 if (isc_dsql_sql_info(stat, &stmt, sizeof(type_item),
160 type_item, sizeof(res_buffer), res_buffer))
161 {
162 throw_iscerror(stat);
163 }
164
165 if (res_buffer[0] == isc_info_sql_stmt_type)
166 {
167 length = isc_vax_integer(res_buffer+1, 2);
168 stype = isc_vax_integer(res_buffer+3, static_cast<short>(length));
169 }
170 else
171 {
172 throw soci_error("Can't determine statement type.");
173 }
174
175 return stype;
176 }
177}
178
179void firebird_statement_backend::rewriteQuery(

Callers 1

rewriteQueryMethod · 0.85

Calls 1

throw_iscerrorFunction · 0.85

Tested by

no test coverage detected