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

Function SQLExecDirect

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

Source from the content-addressed store, hash-verified

1035}
1036
1037SQLRETURN SQLExecDirect(SQLHSTMT stmt, SQLWCHAR* query_text, SQLINTEGER text_length) {
1038 ARROW_LOG(DEBUG) << "SQLExecDirectW called with stmt: " << stmt
1039 << ", query_text: " << static_cast<const void*>(query_text)
1040 << ", text_length: " << text_length;
1041
1042 using ODBC::ODBCStatement;
1043 // The driver is built to handle SELECT statements only.
1044 return ODBCStatement::ExecuteWithDiagnostics(stmt, SQL_ERROR, [=]() {
1045 ODBCStatement* statement = reinterpret_cast<ODBCStatement*>(stmt);
1046 std::string query = ODBC::SqlWcharToString(query_text, text_length);
1047
1048 statement->Prepare(query);
1049 statement->ExecutePrepared();
1050
1051 return SQL_SUCCESS;
1052 });
1053}
1054
1055SQLRETURN SQLPrepare(SQLHSTMT stmt, SQLWCHAR* query_text, SQLINTEGER text_length) {
1056 ARROW_LOG(DEBUG) << "SQLPrepareW called with stmt: " << stmt

Callers 10

GetSQLColAttributeStringFunction · 0.50
TYPED_TESTFunction · 0.50
TEST_FFunction · 0.50
TYPED_TESTFunction · 0.50
TEST_FFunction · 0.50
TYPED_TESTFunction · 0.50
TYPED_TESTFunction · 0.50

Calls 3

SqlWcharToStringFunction · 0.85
PrepareMethod · 0.45
ExecutePreparedMethod · 0.45

Tested by 10

GetSQLColAttributeStringFunction · 0.40
TYPED_TESTFunction · 0.40
TEST_FFunction · 0.40
TYPED_TESTFunction · 0.40
TEST_FFunction · 0.40
TYPED_TESTFunction · 0.40
TYPED_TESTFunction · 0.40