MCPcopy Create free account
hub / github.com/apache/arrow / SQLBindCol

Function SQLBindCol

cpp/src/arrow/flight/sql/odbc/odbc_api.cc:1181–1197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1179}
1180
1181SQLRETURN SQLBindCol(SQLHSTMT stmt, SQLUSMALLINT record_number, SQLSMALLINT c_type,
1182 SQLPOINTER data_ptr, SQLLEN buffer_length, SQLLEN* indicator_ptr) {
1183 ARROW_LOG(DEBUG) << "SQLBindCol called with stmt: " << stmt
1184 << ", record_number: " << record_number << ", c_type: " << c_type
1185 << ", data_ptr: " << data_ptr << ", buffer_length: " << buffer_length
1186 << ", indicator_ptr: " << static_cast<const void*>(indicator_ptr);
1187
1188 using ODBC::ODBCDescriptor;
1189 using ODBC::ODBCStatement;
1190 return ODBCStatement::ExecuteWithDiagnostics(stmt, SQL_ERROR, [=]() {
1191 // GH-47021 TODO: implement driver to return indicator value when data pointer is null
1192 ODBCStatement* statement = reinterpret_cast<ODBCStatement*>(stmt);
1193 ODBCDescriptor* ard = statement->GetARD();
1194 ard->BindCol(record_number, c_type, data_ptr, buffer_length, indicator_ptr);
1195 return SQL_SUCCESS;
1196 });
1197}
1198
1199SQLRETURN SQLCloseCursor(SQLHSTMT stmt) {
1200 ARROW_LOG(DEBUG) << "SQLCloseCursor called with stmt: " << stmt;

Callers 2

TYPED_TESTFunction · 0.50
TEST_FFunction · 0.50

Calls 2

GetARDMethod · 0.80
BindColMethod · 0.80

Tested by 2

TYPED_TESTFunction · 0.40
TEST_FFunction · 0.40