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

Function SqlStringToString

cpp/src/arrow/flight/sql/odbc/odbc_impl/encoding_utils.h:129–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129inline std::string SqlStringToString(const unsigned char* sql_str,
130 int32_t sql_str_len = SQL_NTS) {
131 std::string res;
132
133 const char* sql_str_c = reinterpret_cast<const char*>(sql_str);
134
135 if (!sql_str) {
136 return res;
137 }
138
139 if (sql_str_len == SQL_NTS) {
140 res.assign(sql_str_c);
141 } else if (sql_str_len > 0) {
142 res.assign(sql_str_c, sql_str_len);
143 }
144
145 return res;
146}
147
148inline std::vector<SQLWCHAR> ToSqlWCharVector(const std::wstring& ws) {
149 switch (arrow::flight::sql::odbc::GetSqlWCharSize()) {

Callers 1

TYPED_TESTFunction · 0.85

Calls 1

assignMethod · 0.80

Tested by 1

TYPED_TESTFunction · 0.68