(array-schema items-schema)
Inputs: [items-schema :- LancasterSchemaOrNameKW] Returns: LancasterSchema
Creates a Lancaster schema object representing an Avro array with the given items schema.
Inputs: [items-schema :- LancasterSchemaOrNameKW] Returns: LancasterSchema Creates a Lancaster schema object representing an Avro array with the given items schema.
Lancaster schema object representing an Avro boolean.
Lancaster schema object representing an Avro boolean.
Lancaster schema object representing an Avro bytes.
Lancaster schema object representing an Avro bytes.
(def-array-schema clj-name items-schema)
Defines a var whose value is a Lancaster array schema object
Defines a var whose value is a Lancaster array schema object
(def-enum-schema clj-name & args)
Defines a var whose value is a Lancaster enum schema object
Defines a var whose value is a Lancaster enum schema object
(def-fixed-map-schema clj-name key-size values-schema)
Defines a var whose value is an fixed-map-schema object
Defines a var whose value is an fixed-map-schema object
(def-fixed-schema clj-name size)
Defines a var whose value is a Lancaster fixed schema object
Defines a var whose value is a Lancaster fixed schema object
(def-int-map-schema clj-name values-schema)
Defines a var whose value is an int-map-schema object
Defines a var whose value is an int-map-schema object
(def-long-map-schema clj-name values-schema)
Defines a var whose value is an long-map-schema object
Defines a var whose value is an long-map-schema object
(def-map-schema clj-name values-schema)
Defines a var whose value is a Lancaster map schema object
Defines a var whose value is a Lancaster map schema object
(def-maybe-schema clj-name schema)
Defines a var whose value is a Lancaster union schema whose members are l/null-schema and the given schema. Makes a schema nillable.
Defines a var whose value is a Lancaster union schema whose members are l/null-schema and the given schema. Makes a schema nillable.
(def-record-schema clj-name & args)
Defines a var whose value is a Lancaster record schema object
Defines a var whose value is a Lancaster record schema object
(def-union-schema clj-name & member-schemas)
Defines a var whose value is a Lancaster union schema object
Defines a var whose value is a Lancaster union schema object
(default-data schema)
Inputs: [schema :- LancasterSchema] Returns: s/Any
Creates default data that conforms to the given Lancaster schema.
Inputs: [schema :- LancasterSchema] Returns: s/Any Creates default data that conforms to the given Lancaster schema.
(deserialize reader-schema writer-schema ba)
Inputs: [reader-schema :- LancasterSchema writer-schema :- LancasterSchema ba :- ba/ByteArray] Returns: s/Any
Deserializes Avro-encoded data from a byte array, using the given reader and writer schemas.
Inputs: [reader-schema :- LancasterSchema writer-schema :- LancasterSchema ba :- ba/ByteArray] Returns: s/Any Deserializes Avro-encoded data from a byte array, using the given reader and writer schemas.
(deserialize-same schema ba)
Inputs: [schema :- LancasterSchema ba :- ba/ByteArray] Returns: s/Any
Deserializes Avro-encoded data from a byte array, using the given schema as both the reader and writer schema. Note that this is not recommended, since the original writer's schema should always be used to deserialize. The writer's schema (in Parsing Canonical Form) should always be stored or transmitted with encoded data.
Inputs: [schema :- LancasterSchema ba :- ba/ByteArray] Returns: s/Any Deserializes Avro-encoded data from a byte array, using the given schema as both the reader and writer schema. Note that this is not recommended, since the original writer's schema should always be used to deserialize. The writer's schema (in Parsing Canonical Form) should always be stored or transmitted with encoded data.
Lancaster schema object representing an Avro double.
Lancaster schema object representing an Avro double.
(edn schema)
Inputs: [schema :- LancasterSchema] Returns: s/Any
Returns an EDN representation of the given Lancaster schema.
Inputs: [schema :- LancasterSchema] Returns: s/Any Returns an EDN representation of the given Lancaster schema.
(edn->schema edn)
Inputs: [edn :- s/Any] Returns: LancasterSchema
Inputs: [edn :- s/Any] Returns: LancasterSchema
(enum-schema name-kw symbol-keywords)
(enum-schema name-kw docstring symbol-keywords)
(enum-schema G__13294 G__13295)
(enum-schema G__13299 G__13300 G__13301)
Inputs: ([name-kw :- s/Keyword symbol-keywords :- [s/Keyword]] [name-kw :- s/Keyword docstring :- s/Str symbol-keywords :- [s/Keyword]]) Returns: LancasterSchema
Creates a Lancaster schema object representing an Avro enum with the given symbol keywords. For a more concise way to declare an enum schema, see def-enum-schema.
Inputs: ([name-kw :- s/Keyword symbol-keywords :- [s/Keyword]] [name-kw :- s/Keyword docstring :- s/Str symbol-keywords :- [s/Keyword]]) Returns: LancasterSchema Creates a Lancaster schema object representing an Avro enum with the given symbol keywords. For a more concise way to declare an enum schema, see def-enum-schema.
(fingerprint64 schema)
Inputs: [schema :- LancasterSchema] Returns: Long
Returns the 64-bit Rabin fingerprint of the Parsing Canonical Form of the given Lancaster schema.
Inputs: [schema :- LancasterSchema] Returns: Long Returns the 64-bit Rabin fingerprint of the Parsing Canonical Form of the given Lancaster schema.
(fixed-map-schema name-kw key-size values-schema)
Creates a Lancaster schema object representing a map of long
keys
to values described by the given values-schema
.
Differs from map-schema, which only allows string keys.
Creates a Lancaster schema object representing a map of `long` keys to values described by the given `values-schema`. Differs from map-schema, which only allows string keys.
(fixed-schema name-kw size)
Inputs: [name-kw :- s/Keyword size :- s/Int] Returns: LancasterSchema
Creates a Lancaster schema object representing an Avro fixed with the given size. For a more concise way to declare a fixed schema, see def-fixed-schema.
Inputs: [name-kw :- s/Keyword size :- s/Int] Returns: LancasterSchema Creates a Lancaster schema object representing an Avro fixed with the given size. For a more concise way to declare a fixed schema, see def-fixed-schema.
Lancaster schema object representing an Avro float.
Lancaster schema object representing an Avro float.
(int-map-schema name-kw values-schema)
Creates a Lancaster schema object representing a map of int
keys
to values described by the given values-schema
.
Differs from map-schema, which only allows string keys.
Creates a Lancaster schema object representing a map of `int` keys to values described by the given `values-schema`. Differs from map-schema, which only allows string keys.
Lancaster schema object representing an Avro int.
Lancaster schema object representing an Avro int.
(json schema)
Inputs: [schema :- LancasterSchema] Returns: s/Str
Returns an Avro-compliant JSON representation of the given Lancaster schema.
Inputs: [schema :- LancasterSchema] Returns: s/Str Returns an Avro-compliant JSON representation of the given Lancaster schema.
(json->schema json)
Inputs: [json :- s/Str] Returns: LancasterSchema
Creates a Lancaster schema object from an Avro schema in JSON format.
Inputs: [json :- s/Str] Returns: LancasterSchema Creates a Lancaster schema object from an Avro schema in JSON format.
Lancaster schema object representing a (possibly namespaced) Clojure keyword.
Lancaster schema object representing a (possibly namespaced) Clojure keyword.
(long-map-schema name-kw values-schema)
Creates a Lancaster schema object representing a map of long
keys
to values described by the given values-schema
.
Differs from map-schema, which only allows string keys.
Creates a Lancaster schema object representing a map of `long` keys to values described by the given `values-schema`. Differs from map-schema, which only allows string keys.
Lancaster schema object representing an Avro long.
Lancaster schema object representing an Avro long.
(map-schema values-schema)
Inputs: [values-schema :- LancasterSchemaOrNameKW] Returns: LancasterSchema
Creates a Lancaster schema object representing an Avro map with the given values schema. Keys are always strings.
Inputs: [values-schema :- LancasterSchemaOrNameKW] Returns: LancasterSchema Creates a Lancaster schema object representing an Avro map with the given values schema. Keys are always strings.
(maybe schema)
Inputs: [schema :- LancasterSchemaOrNameKW] Returns: LancasterSchema
Creates a Lancaster union schema whose members are l/null-schema and the given schema. Makes a schema nillable. If the given schema is a union, returns a schema with l/null-schema in the first postion. If the given union schema already has l/null-schema as a member, it is returned unchanged. Similarly, if the given schema is l/null-schema, it is returned unchanged.
Inputs: [schema :- LancasterSchemaOrNameKW] Returns: LancasterSchema Creates a Lancaster union schema whose members are l/null-schema and the given schema. Makes a schema nillable. If the given schema is a union, returns a schema with l/null-schema in the first postion. If the given union schema already has l/null-schema as a member, it is returned unchanged. Similarly, if the given schema is l/null-schema, it is returned unchanged.
(name-kw schema)
Inputs: [schema :- LancasterSchema] Returns: s/Keyword
Returns the name keyword for the given Lancaster schema.
Inputs: [schema :- LancasterSchema] Returns: s/Keyword Returns the name keyword for the given Lancaster schema.
Lancaster schema object representing an Avro null.
Lancaster schema object representing an Avro null.
(pcf schema)
Inputs: [schema :- LancasterSchema] Returns: s/Str
Returns a JSON string containing the Avro Parsing Canonical Form of the given Lancaster schema.
Inputs: [schema :- LancasterSchema] Returns: s/Str Returns a JSON string containing the Avro Parsing Canonical Form of the given Lancaster schema.
(plumatic-schema schema)
Inputs: [schema :- LancasterSchema] Returns: s/Any
Returns a Plumatic schema for the given Lancaster schema.
Inputs: [schema :- LancasterSchema] Returns: s/Any Returns a Plumatic schema for the given Lancaster schema.
(record-schema name-kw fields)
(record-schema name-kw docstring fields)
(record-schema G__13280 G__13281)
(record-schema G__13285 G__13286 G__13287)
Inputs: ([name-kw :- s/Keyword fields :- s/Any] [name-kw :- s/Keyword docstring :- s/Str fields :- s/Any]) Returns: LancasterSchema
Creates a Lancaster schema object representing an Avro record with the given field definitions. For a more concise way to declare a record schema, see def-record-schema.
Inputs: ([name-kw :- s/Keyword fields :- s/Any] [name-kw :- s/Keyword docstring :- s/Str fields :- s/Any]) Returns: LancasterSchema Creates a Lancaster schema object representing an Avro record with the given field definitions. For a more concise way to declare a record schema, see def-record-schema.
(schema-at-path schema path)
Inputs: [schema :- LancasterSchema path :- [s/Any]] Returns: (s/maybe LancasterSchema)
Inputs: [schema :- LancasterSchema path :- [s/Any]] Returns: (s/maybe LancasterSchema)
(schema-type schema)
Inputs: [schema :- LancasterSchema] Returns: s/Keyword
Returns the Avro type of the given schema
Inputs: [schema :- LancasterSchema] Returns: s/Keyword Returns the Avro type of the given schema
(schema? arg)
Inputs: [arg :- s/Any] Returns: s/Bool
Returns a boolean indicating whether or not the argument is a Lancaster schema object.
Inputs: [arg :- s/Any] Returns: s/Bool Returns a boolean indicating whether or not the argument is a Lancaster schema object.
(schemas-match? reader-schema writer-schema)
Inputs: [reader-schema :- LancasterSchema writer-schema :- LancasterSchema] Returns: s/Bool
Returns a boolean indicating whether or not the given reader and writer schemas match, according to the Avro matching rules.
Inputs: [reader-schema :- LancasterSchema writer-schema :- LancasterSchema] Returns: s/Bool Returns a boolean indicating whether or not the given reader and writer schemas match, according to the Avro matching rules.
(serialize writer-schema data)
Inputs: [writer-schema :- LancasterSchema data :- s/Any] Returns: ba/ByteArray
Serializes data to a byte array, using the given Lancaster schema.
Inputs: [writer-schema :- LancasterSchema data :- s/Any] Returns: ba/ByteArray Serializes data to a byte array, using the given Lancaster schema.
Lancaster schema object representing an Avro string.
Lancaster schema object representing an Avro string.
Lancaster schema object representing a Clojure set with string members. Implemented using an Avro map with null values.
Lancaster schema object representing a Clojure set with string members. Implemented using an Avro map with null values.
(union-schema member-schemas)
Inputs: [member-schemas :- [LancasterSchemaOrNameKW]] Returns: LancasterSchema
Creates a Lancaster schema object representing an Avro union with the given member schemas.
Inputs: [member-schemas :- [LancasterSchemaOrNameKW]] Returns: LancasterSchema Creates a Lancaster schema object representing an Avro union with the given member schemas.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close