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

Function SQLBindCol

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

Source from the content-addressed store, hash-verified

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