(&mut self)
| 2267 | } |
| 2268 | |
| 2269 | fn parse_glue_avro_option(&mut self) -> Result<GlueAvroOption<Raw>, ParserError> { |
| 2270 | self.expect_keywords(&[SCHEMA, NAME])?; |
| 2271 | // The value is parsed as optional even though SCHEMA NAME requires one currently. |
| 2272 | // Enforcing it here wouldn't let us drop the purification-layer check: |
| 2273 | // the whole option list is optional, so `CONNECTION glue_conn` and |
| 2274 | // `(...)` with no SCHEMA NAME bypass this function entirely. This also allows |
| 2275 | // us to provide more detailed errors. |
| 2276 | // |
| 2277 | // Future work may add mutually exclusive options (or interpret a lack of schema name). |
| 2278 | // For example, a lack of schema name may fall back to the default AWS Glue naming strategy: |
| 2279 | // See <https://github.com/awslabs/aws-glue-schema-registry/blob/4b9cac477d6876a883e2a8893738a30c072694dc/common/src/main/java/com/amazonaws/services/schemaregistry/common/AWSSchemaNamingStrategyDefaultImpl.java#L18> |
| 2280 | Ok(GlueAvroOption { |
| 2281 | name: GlueAvroOptionName::SchemaName, |
| 2282 | value: self.parse_optional_option_value()?, |
| 2283 | }) |
| 2284 | } |
| 2285 | |
| 2286 | fn parse_protobuf_schema(&mut self) -> Result<ProtobufSchema<Raw>, ParserError> { |
| 2287 | if self.parse_keywords(&[USING, CONFLUENT, SCHEMA, REGISTRY]) { |
nothing calls this directly
no test coverage detected