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

Function SQLExecDirect

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

Source from the content-addressed store, hash-verified

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