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

Function AsInt32

cpp/src/arrow/flight/sql/odbc/odbc_impl/util.cc:1133–1146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1131}
1132
1133std::optional<int32_t> AsInt32(int32_t min_value,
1134 const Connection::ConnPropertyMap& conn_property_map,
1135 std::string_view property_name) {
1136 auto extracted_property = conn_property_map.find(property_name);
1137
1138 if (extracted_property != conn_property_map.end()) {
1139 const int32_t string_column_length = std::stoi(extracted_property->second);
1140
1141 if (string_column_length >= min_value && string_column_length <= INT32_MAX) {
1142 return string_column_length;
1143 }
1144 }
1145 return std::nullopt;
1146}
1147
1148} // namespace util
1149} // namespace arrow::flight::sql::odbc

Callers 2

GetStringColumnLengthMethod · 0.85

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected