constructor Method

Overloads
constructorSchema(context)  
constructorSchema(context, key, alias)  
constructorSchema(context, name, alias, readVersion, writeVersion, minorVersion)  

Schema(context)

Constructs an empty Schema (without a SchemaKey) in the provided context. This should only be used when the schema name and version will be deserialized (via fromJson()) immediately after this Schema is instantiated.

Schema(context: SchemaContext): Schema

Parameter Type Description
context SchemaContext The SchemaContext that will control the lifetime of the schema

Returns - Schema



Schema(context, key, alias)

Constructs an empty Schema with the given key in the provided context.

Schema(context: SchemaContext, key: SchemaKey, alias: string): Schema

Parameter Type Description
context SchemaContext The SchemaContext that will control the lifetime of the schema
key SchemaKey A SchemaKey that uniquely identifies the schema
alias string  

Returns - Schema



Schema(context, name, alias, readVersion, writeVersion, minorVersion)

Constructs an empty Schema with the given name and version in the provided context.

Schema(context: SchemaContext, name: string, alias: string, readVersion: number, writeVersion: number, minorVersion: number): Schema

Parameter Type Description
context SchemaContext The SchemaContext that will control the lifetime of the schema
name string The schema's name
alias string  
readVersion number The integer read (major) version of the schema
writeVersion number The integer write version of the schema
minorVersion number The integer minor version of the schema

Returns - Schema


Defined in

Last Updated: 16 April, 2024