Packages

c

ca.dataedu.savro.AvroImplicits

SchemaImprovement

implicit class SchemaImprovement extends AnyRef

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SchemaImprovement
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SchemaImprovement(schema: Schema)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def flat: Either[AvroSchemaError, Schema]

    Converts the schema to its flatten version.

    Converts the schema to its flatten version. It supports primitives, arrays and nested complex data structures.

    Rules:

    - If a primitive, keeps it as is - If a record, flatten all the fields so that they become primitive. Then appends the field name to the children's field name and use their type as the output type. For example,

    {
      "type": "record",
      "name": "PaymentRecord",
      "fields": [
        {
           "name": "paymentView",
           "type": "record",
           "name": "PaymentView",
           "fields": [
             { "name": "payment", "type": "long" },
             { "name": "revoked", "type": ["null", "boolean"], "default": null },
           ]
        }
      ]
    }

    becomes

    {
      "type": "record",
      "name": "PaymentRecord",
      "fields": [
        { "name": "paymentView_payment", "type": "long" },
        { "name": "paymentView_revoked", type": ["null", "boolean"], "default": null }
      ]
    }

    - If an array, it first makes sure that the type is a primitive with any flattening rule and then use it as the output. As an array could be empty, regardless of being optional or not, we always set the fields as optional. An array, in the process of flattening will cause an explosion.

  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def getTypeWithoutNull: Either[NonNullableUnionTypeError, Schema]

    In case of a nullable schema, it returns the type if it's not null.

    In case of a nullable schema, it returns the type if it's not null. A nullable schema in Avro is the UNION of NULL and the actual type. In this method, we assume that there is no more than one type (besides NULL) in the union.

  12. final def getTypesWithoutNull: Schema
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. final def isArray: Boolean
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def isRecord: Boolean
  17. final def makeNullable: Schema

    If schema is not nullable, it will make it nullable with a default value of 'null'

  18. final def mergeWith(otherSchema: Schema): Schema
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  23. final def toIdl(protocol: String): Either[IllegalOperationError, String]
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def union(other: Schema): Schema

    Union of two schema It makes sure that the "null" schema comes first.

    Union of two schema It makes sure that the "null" schema comes first. But if both of them are null, it returns only one of them. Otherwise, returns the union of the types of both schema.

    Annotations
    @tailrec()
  26. def unionWithNonUnion(nonUnion: Schema): Schema

    Union with a non-union assuming this schema is a union itself

  27. def unionWithUnion(union: Schema): Schema
  28. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped