| 381 | } |
| 382 | |
| 383 | std::optional<Connection::Attribute> FlightSqlConnection::GetAttribute( |
| 384 | Connection::AttributeId attribute) { |
| 385 | switch (attribute) { |
| 386 | case ACCESS_MODE: |
| 387 | // FlightSQL does not provide this metadata. |
| 388 | return std::make_optional(Attribute(static_cast<uint32_t>(SQL_MODE_READ_WRITE))); |
| 389 | case PACKET_SIZE: |
| 390 | return std::make_optional(Attribute(static_cast<uint32_t>(0))); |
| 391 | default: |
| 392 | const auto& it = attribute_.find(attribute); |
| 393 | if (it != attribute_.end()) { |
| 394 | return std::make_optional(it->second); |
| 395 | } else { |
| 396 | return std::nullopt; |
| 397 | } |
| 398 | } |
| 399 | } |
| 400 | |
| 401 | Connection::Info FlightSqlConnection::GetInfo(uint16_t info_type) { |
| 402 | auto result = info_.GetInfo(info_type); |