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

Function SQLSetStmtAttr

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

Source from the content-addressed store, hash-verified

1017}
1018
1019SQLRETURN SQLSetStmtAttr(SQLHSTMT stmt, SQLINTEGER attribute, SQLPOINTER value_ptr,
1020 SQLINTEGER string_length) {
1021 ARROW_LOG(DEBUG) << "SQLSetStmtAttrW called with stmt: " << stmt
1022 << ", attribute: " << attribute << ", value_ptr: " << value_ptr
1023 << ", string_length: " << string_length;
1024
1025 using ODBC::ODBCStatement;
1026
1027 return ODBCStatement::ExecuteWithDiagnostics(stmt, SQL_ERROR, [=]() {
1028 ODBCStatement* statement = reinterpret_cast<ODBCStatement*>(stmt);
1029
1030 bool is_unicode = true;
1031
1032 statement->SetStmtAttr(attribute, value_ptr, string_length, is_unicode);
1033
1034 return SQL_SUCCESS;
1035 });
1036}
1037
1038SQLRETURN SQLExecDirect(SQLHSTMT stmt, SQLWCHAR* query_text, SQLINTEGER text_length) {
1039 ARROW_LOG(DEBUG) << "SQLExecDirectW called with stmt: " << stmt

Callers 4

TYPED_TESTFunction · 0.50
ValidateSetStmtAttrFunction · 0.50
TYPED_TESTFunction · 0.50

Calls 1

SetStmtAttrMethod · 0.80

Tested by 4

TYPED_TESTFunction · 0.40
ValidateSetStmtAttrFunction · 0.40
TYPED_TESTFunction · 0.40