| 1131 | } |
| 1132 | |
| 1133 | std::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 |
no test coverage detected