| 48 | namespace { |
| 49 | |
| 50 | arrow::Result<GetCrossReference> ParseCommandGetCrossReference( |
| 51 | const google::protobuf::Any& any) { |
| 52 | pb::sql::CommandGetCrossReference command; |
| 53 | if (!any.UnpackTo(&command)) { |
| 54 | return Status::Invalid("Unable to unpack CommandGetCrossReference."); |
| 55 | } |
| 56 | |
| 57 | GetCrossReference result; |
| 58 | result.pk_table_ref = {PROPERTY_TO_OPTIONAL(command, pk_catalog), |
| 59 | PROPERTY_TO_OPTIONAL(command, pk_db_schema), command.pk_table()}; |
| 60 | result.fk_table_ref = {PROPERTY_TO_OPTIONAL(command, fk_catalog), |
| 61 | PROPERTY_TO_OPTIONAL(command, fk_db_schema), command.fk_table()}; |
| 62 | return result; |
| 63 | } |
| 64 | |
| 65 | arrow::Result<GetImportedKeys> ParseCommandGetImportedKeys( |
| 66 | const google::protobuf::Any& any) { |