Liking cljdoc? Tell your friends :D

abracad.avro

Functions for de/serializing data with Avro.

Functions for de/serializing data with Avro.
raw docstring

*avro-readers*clj

Like clojure.core/*data-readers*, but for reading Avro records. Initializes with merged contents of avro_readers.clj resources. Whenever an Avro record is deserialized, the Clojure datum reader will check this map for a key matching the Avro record name represented as a namespace-qualified symbol. When found, the datum reader will invoke the associated value as a function on the deserialized record's fields as positional arguments. The datum reader will use the return value as the deserialization result.

Like `clojure.core/*data-readers*`, but for reading Avro records.
Initializes with merged contents of `avro_readers.clj` resources.
Whenever an Avro record is deserialized, the Clojure datum reader will
check this map for a key matching the Avro record name represented as
a namespace-qualified symbol.  When found, the datum reader will
invoke the associated value as a function on the deserialized record's
fields as positional arguments.  The datum reader will use the return
value as the deserialization result.
sourceraw docstring

AvroSerializablecljprotocol

Protocol for customizing Avro serialization.

Protocol for customizing Avro serialization.

field-getclj

(field-get this field)

Value of keyword field for Avro serialization of object.

Value of keyword `field` for Avro serialization of object.

field-listclj

(field-list this)

List of keyword fields this object provides.

List of keyword fields this object provides.

schema-nameclj

(schema-name this)

Full package-/namespace-qualified name for Avro purposes.

Full package-/namespace-qualified name for Avro purposes.
sourceraw docstring

binary-decoderclj

(binary-decoder source)

Return a binary-encoding decoder for source. The source may be an input stream, a byte array, or a vector of [bytes off len].

Return a binary-encoding decoder for `source`.  The `source` may be
an input stream, a byte array, or a vector of `[bytes off len]`.
sourceraw docstring

binary-encodedclj

(binary-encoded schema & records)

Return bytes produced by binary-encoding records with schema via encode.

Return bytes produced by binary-encoding `records` with `schema`
via `encode`.
sourceraw docstring

binary-encoderclj

(binary-encoder sink)

Return a binary-encoding encoder for sink.

Return a binary-encoding encoder for `sink`.
sourceraw docstring

compareclj

(compare schema x y)

Compare x and y according to schema.

Compare `x` and `y` according to `schema`.
sourceraw docstring

data-file-readerclj

(data-file-reader source)
(data-file-reader expected source)

Return an Avro DataFileReader which produces Clojure data structures.

Return an Avro DataFileReader which produces Clojure data structures.
sourceraw docstring

data-file-streamclj

(data-file-stream source)
(data-file-stream expected source)

Return an Avro DataFileStream which produces Clojure data structures.

Return an Avro DataFileStream which produces Clojure data structures.
sourceraw docstring

data-file-writerclj

(data-file-writer)
(data-file-writer sink)
(data-file-writer schema sink)
(data-file-writer codec schema sink)

Return an Avro DataFileWriter which consumes Clojure data structures.

Return an Avro DataFileWriter which consumes Clojure data structures.
sourceraw docstring

datum-readerclj

(datum-reader)
(datum-reader schema)
(datum-reader expected actual)

Return an Avro DatumReader which produces Clojure data structures.

Return an Avro DatumReader which produces Clojure data structures.
sourceraw docstring

datum-writerclj

(datum-writer)
(datum-writer schema)

Return an Avro DatumWriter which consumes Clojure data structures.

Return an Avro DatumWriter which consumes Clojure data structures.
sourceraw docstring

decodeclj

(decode schema source)

Decode and return one object from source using schema. The source may be an existing Decoder object or anything on which a (binary-encoding) Decoder may be opened.

Decode and return one object from `source` using `schema`.  The
`source` may be an existing Decoder object or anything on which
a (binary-encoding) Decoder may be opened.
sourceraw docstring

decode-seqclj

(decode-seq schema source)

As per decode, but decode and return a sequence of all objects decoded serially from source.

As per `decode`, but decode and return a sequence of all objects
decoded serially from `source`.
sourceraw docstring

deflogicalcljmacro

(deflogical type name read-impl write-impl)

Declare a new logical type.

Declare a new logical type.
sourceraw docstring

direct-binary-decoderclj

(direct-binary-decoder source)

Return a non-buffered binary-encoding decoder for source.

Return a non-buffered binary-encoding decoder for `source`.
sourceraw docstring

direct-binary-encoderclj

(direct-binary-encoder sink)

Return an unbuffered binary-encoding encoder for sink.

Return an unbuffered binary-encoding encoder for `sink`.
sourceraw docstring

encodeclj

(encode schema sink & records)

Serially encode each record in records to sink using schema. The sink may be an existing Encoder object, or anything on which a (binary-encoding) Encoder may be opened.

Serially encode each record in `records` to `sink` using `schema`.
The `sink` may be an existing Encoder object, or anything on which
a (binary-encoding) Encoder may be opened.
sourceraw docstring

grouping-schemaclj

(grouping-schema n schema)

Produce a grouping schema version of record schema schema which ignores all but the first n fields when sorting.

Produce a grouping schema version of record schema `schema` which ignores all
but the first `n` fields when sorting.
sourceraw docstring

json-decoderclj

(json-decoder schema source)

Return a JSON-encoding decoder for source using schema.

Return a JSON-encoding decoder for `source` using `schema`.
sourceraw docstring

json-encodedclj

(json-encoded schema & records)

Return string produced by JSON-encoding records with schema via encode.

Return string produced by JSON-encoding `records` with `schema`
via `encode`.
sourceraw docstring

json-encoderclj

(json-encoder schema sink)

Return a JSON-encoding encoder for sink using schema.

Return a JSON-encoding encoder for `sink` using `schema`.
sourceraw docstring

mslurpclj

(mslurp f & opts)

Like Avro slurp, but produces a sequence of records.

Like Avro `slurp`, but produces a sequence of records.
sourceraw docstring

mspitclj

(mspit schema f content & opts)

Like Avro spit, but emits content as a sequence of records.

Like Avro `spit`, but emits `content` as a sequence of records.
sourceraw docstring

parse-schemaclj

(parse-schema source)
(parse-schema source & sources)

Parse Avro schemas in source and sources. Each schema source may be a JSON string, an input stream containing a JSON schema, a Clojure data structure which may be converted to a JSON schema, or an already-parsed Avro schema object. The schema for each subsequent source may refer to the types defined in the previous schemas. The parsed schema from the final source is returned.

Parse Avro schemas in `source` and `sources`.  Each schema source may be a
JSON string, an input stream containing a JSON schema, a Clojure data structure
which may be converted to a JSON schema, or an already-parsed Avro schema
object.  The schema for each subsequent source may refer to the types defined in
the previous schemas.  The parsed schema from the final source is returned.
sourceraw docstring

PSeekableInputcljprotocol

Protocol for coercing to an Avro SeekableInput.

Protocol for coercing to an Avro `SeekableInput`.

-seekable-inputclj

(-seekable-input x opts)

Attempt to util/coerce x to an Avro SeekableInput.

Attempt to util/coerce `x` to an Avro `SeekableInput`.
sourceraw docstring

schema?clj

(schema? schema)

True iff schema is an Avro Schema instance.

True iff `schema` is an Avro `Schema` instance.
sourceraw docstring

seekable-inputclj

(seekable-input x)
(seekable-input opts x)

Attempt to util/coerce x to an Avro SeekableInput.

Attempt to util/coerce `x` to an Avro `SeekableInput`.
sourceraw docstring

slurpclj

(slurp f & opts)

Like core slurp, but reads Avro content from f.

Like core `slurp`, but reads Avro content from `f`.
sourceraw docstring

spitclj

(spit schema f content & opts)

Like core spit, but emits content to f as Avro with schema.

Like core `spit`, but emits `content` to `f` as Avro with `schema`.
sourceraw docstring

tuple-schemaclj

(tuple-schema types)
(tuple-schema name types)

Return Clojure-data Avro schema for record consisting of fields of the provided types, and optionally named name.

Return Clojure-data Avro schema for record consisting of fields of the
provided `types`, and optionally named `name`.
sourceraw docstring

unparse-schemaclj

(unparse-schema schema)

Return Avro-normalized Clojure data version of schema. If schema is not already a parsed schema, will first normalize and parse it.

Return Avro-normalized Clojure data version of `schema`.  If `schema` is not
already a parsed schema, will first normalize and parse it.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close