Class: Avro::SchemaCompatibility::Checker
- Inherits:
-
Object
- Object
- Avro::SchemaCompatibility::Checker
- Defined in:
- lib/avro-patches/schema_compatibility/schema_compatibility.rb
Constant Summary collapse
- SIMPLE_CHECKS =
Avro::Schema::PRIMITIVE_TYPES_SYM.dup.add(:fixed).freeze
Instance Method Summary collapse
- #can_read?(writers_schema, readers_schema) ⇒ Boolean
-
#initialize ⇒ Checker
constructor
A new instance of Checker.
- #mutual_read?(writers_schema, readers_schema) ⇒ Boolean
Constructor Details
#initialize ⇒ Checker
Returns a new instance of Checker.
65 66 67 |
# File 'lib/avro-patches/schema_compatibility/schema_compatibility.rb', line 65 def initialize @recursion_set = Set.new end |
Instance Method Details
#can_read?(writers_schema, readers_schema) ⇒ Boolean
69 70 71 |
# File 'lib/avro-patches/schema_compatibility/schema_compatibility.rb', line 69 def can_read?(writers_schema, readers_schema) full_match_schemas(writers_schema, readers_schema) end |
#mutual_read?(writers_schema, readers_schema) ⇒ Boolean
73 74 75 |
# File 'lib/avro-patches/schema_compatibility/schema_compatibility.rb', line 73 def mutual_read?(writers_schema, readers_schema) can_read?(writers_schema, readers_schema) && can_read?(readers_schema, writers_schema) end |