Class for union schemas.
More...
List of all members.
Public Member Functions |
int | MatchingBranch (Schema s) |
| Returns the index of a branch that can read the data written by the given schema s.
|
override bool | CanRead (Schema writerSchema) |
| Checks if this schema can read data written by the given schema. Used for decoding data.
|
override bool | Equals (object obj) |
| Compares two union schema objects.
|
override int | GetHashCode () |
| Hash code function.
|
Protected Member Functions |
internal override void | WriteJson (Newtonsoft.Json.JsonTextWriter writer, SchemaNames names, string encspace) |
| Writes union schema in JSON format.
|
Properties |
IList< Schema > | Schemas [get, set] |
| List of schemas in the union.
|
int | Count [get] |
| Count of schemas in the union.
|
Schema | this[int index] [get] |
| Returns the schema at the given branch.
|
Detailed Description
Member Function Documentation
Checks if this schema can read data written by the given schema. Used for decoding data.
- Parameters:
-
writerSchema | writer schema |
- Returns:
- true if this and writer schema are compatible based on the AVRO specification, false otherwise
Reimplemented from Avro.Schema.
Compares two union schema objects.
- Parameters:
-
obj | union schema object to compare against this schema |
- Returns:
- true if objects are equal, false otherwise
Hash code function.
- Returns:
Reimplemented from Avro.Schema.
Returns the index of a branch that can read the data written by the given schema s.
- Parameters:
-
s | The schema to match the branches against. |
- Returns:
- The index of the matching branch. If non matches a -1 is returned.
Writes union schema in JSON format.
- Parameters:
-
writer | JSON writer |
names | list of named schemas already written |
encspace | enclosing namespace of the schema |
Property Documentation
Count of schemas in the union.
List of schemas in the union.
Schema Avro.UnionSchema.this[int index] [get] |
Returns the schema at the given branch.
- Parameters:
-
index | Index to the branch, starting with 0. |
- Returns:
- The branch corresponding to the given index.
The documentation for this class was generated from the following file:
- src/apache/main/Schema/UnionSchema.cs