| 386 | } |
| 387 | |
| 388 | arrow::Result<std::unique_ptr<FlightInfo>> FlightSqlClient::GetTables( |
| 389 | const FlightCallOptions& options, const std::string* catalog, |
| 390 | const std::string* db_schema_filter_pattern, const std::string* table_filter_pattern, |
| 391 | bool include_schema, const std::vector<std::string>* table_types) { |
| 392 | flight_sql_pb::CommandGetTables command; |
| 393 | |
| 394 | if (catalog != NULLPTR) { |
| 395 | command.set_catalog(*catalog); |
| 396 | } |
| 397 | |
| 398 | if (db_schema_filter_pattern != NULLPTR) { |
| 399 | command.set_db_schema_filter_pattern(*db_schema_filter_pattern); |
| 400 | } |
| 401 | |
| 402 | if (table_filter_pattern != NULLPTR) { |
| 403 | command.set_table_name_filter_pattern(*table_filter_pattern); |
| 404 | } |
| 405 | |
| 406 | command.set_include_schema(include_schema); |
| 407 | |
| 408 | if (table_types != NULLPTR) { |
| 409 | for (const std::string& table_type : *table_types) { |
| 410 | command.add_table_types(table_type); |
| 411 | } |
| 412 | } |
| 413 | |
| 414 | return GetFlightInfoForCommand(this, options, command); |
| 415 | } |
| 416 | |
| 417 | arrow::Result<std::unique_ptr<SchemaResult>> FlightSqlClient::GetTablesSchema( |
| 418 | const FlightCallOptions& options, bool include_schema) { |