Classes | Public Member Functions | Protected Member Functions | Properties

Avro::RecordSchema Class Reference

Class for record schemas. More...

Inheritance diagram for Avro::RecordSchema:
Avro::NamedSchema Avro::Schema

List of all members.

Classes

class  RecordSchemaPair

Public Member Functions

bool Contains (string fieldName)
 Returns true if and only if the record contains a field by the given name.
bool TryGetField (string fieldName, out Field field)
bool TryGetFieldAlias (string fieldName, out Field field)
IEnumerator< FieldGetEnumerator ()
 Returns an enumerator which enumerates over the fields of this record schema.
override bool Equals (object obj)
 Compares equality of two record schemas.
override int GetHashCode ()
 Hash code function.
override bool CanRead (Schema writerSchema)
 Checks if this schema can read data written by the given schema. Used for decoding data.

Protected Member Functions

internal override void WriteJsonFields (Newtonsoft.Json.JsonTextWriter writer, SchemaNames names, string encspace)
 Writes the records schema in JSON format.

Properties

List< FieldFields [get, set]
 List of fields in the record.
int Count [get]
 Number of fields in the record.
Field this [string name] [get]
 Returns the field with the given name.

Detailed Description

Class for record schemas.


Member Function Documentation

override bool Avro::RecordSchema::CanRead ( Schema  writerSchema  )  [inline, virtual]

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.

bool Avro::RecordSchema::Contains ( string  fieldName  )  [inline]

Returns true if and only if the record contains a field by the given name.

Parameters:
fieldName The name of the field
Returns:
true if the field exists, false otherwise
override bool Avro::RecordSchema::Equals ( object  obj  )  [inline]

Compares equality of two record schemas.

Parameters:
obj record schema to compare against this schema
Returns:
true if the two schemas are equal, false otherwise
IEnumerator<Field> Avro::RecordSchema::GetEnumerator (  )  [inline]

Returns an enumerator which enumerates over the fields of this record schema.

Returns:
Enumerator over the field in the order of their definition
override int Avro::RecordSchema::GetHashCode (  )  [inline]

Hash code function.

Returns:

Reimplemented from Avro::Schema.

internal override void Avro::RecordSchema::WriteJsonFields ( Newtonsoft.Json.JsonTextWriter  writer,
SchemaNames  names,
string  encspace 
) [inline, protected]

Writes the records schema in JSON format.

Parameters:
writer JSON writer
names list of named schemas already written
encspace enclosing namespace of the record schema

Reimplemented from Avro::NamedSchema.


Property Documentation

int Avro::RecordSchema::Count [get]

Number of fields in the record.

List<Field> Avro::RecordSchema::Fields [get, set]

List of fields in the record.

Field Avro::RecordSchema::this[string name] [get]

Returns the field with the given name.

Parameters:
name field name
Returns:
Field object

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Properties