| 156 | int64_t FlightSqlStatement::GetUpdateCount() { return -1; } |
| 157 | |
| 158 | std::shared_ptr<ResultSet> FlightSqlStatement::GetTables( |
| 159 | const std::string* catalog_name, const std::string* schema_name, |
| 160 | const std::string* table_name, const std::string* table_type, |
| 161 | const ColumnNames& column_names) { |
| 162 | ClosePreparedStatementIfAny(prepared_statement_, call_options_); |
| 163 | |
| 164 | std::vector<std::string> table_types; |
| 165 | |
| 166 | if ((catalog_name && *catalog_name == "%") && (schema_name && schema_name->empty()) && |
| 167 | (table_name && table_name->empty())) { |
| 168 | current_result_set_ = |
| 169 | GetTablesForSQLAllCatalogs(column_names, client_options_, call_options_, |
| 170 | sql_client_, diagnostics_, metadata_settings_); |
| 171 | } else if ((catalog_name && catalog_name->empty()) && |
| 172 | (schema_name && *schema_name == "%") && |
| 173 | (table_name && table_name->empty())) { |
| 174 | current_result_set_ = GetTablesForSQLAllDbSchemas( |
| 175 | column_names, client_options_, call_options_, sql_client_, schema_name, |
| 176 | diagnostics_, metadata_settings_); |
| 177 | } else if ((catalog_name && catalog_name->empty()) && |
| 178 | (schema_name && schema_name->empty()) && |
| 179 | (table_name && table_name->empty()) && (table_type && *table_type == "%")) { |
| 180 | current_result_set_ = |
| 181 | GetTablesForSQLAllTableTypes(column_names, client_options_, call_options_, |
| 182 | sql_client_, diagnostics_, metadata_settings_); |
| 183 | } else { |
| 184 | if (table_type) { |
| 185 | ParseTableTypes(*table_type, table_types); |
| 186 | } |
| 187 | |
| 188 | current_result_set_ = GetTablesForGenericUse( |
| 189 | column_names, client_options_, call_options_, sql_client_, catalog_name, |
| 190 | schema_name, table_name, table_types, diagnostics_, metadata_settings_); |
| 191 | } |
| 192 | |
| 193 | return current_result_set_; |
| 194 | } |
| 195 | |
| 196 | std::shared_ptr<ResultSet> FlightSqlStatement::GetTables_V2( |
| 197 | const std::string* catalog_name, const std::string* schema_name, |
no test coverage detected