Avro schema are constant, spec are designed to be constant. As a
result, side effects are acceptable in protocol ToSpec. assert
is
used more than usual. Wherever an inconsistent state is detected,
it's prefered to raise a argsual error message rather than unclear
exception or worse: an erroneous output.
Reference: https://avro.apache.org/docs/1.8.2/spec.html. Any difference should be considered a bug.
Avro schema are constant, spec are designed to be constant. As a result, side effects are acceptable in protocol ToSpec. `assert` is used more than usual. Wherever an inconsistent state is detected, it's prefered to raise a argsual error message rather than unclear exception or worse: an erroneous output. Reference: https://avro.apache.org/docs/1.8.2/spec.html. Any difference should be considered a bug.
Sequence of 8-bit unsigned bytes. Returns a singleton of the given size.
Sequence of 8-bit unsigned bytes. Returns a singleton of the given size.
(->avro-logical-decimal? precision scale)
Represents an arbitrary-precision signed decimal number of the form
precision × 10-scale. Annotates Avro bytes or fixed types.
Represented with a java.math.BigDecimal
in generated Java
sources.
Represents an arbitrary-precision signed decimal number of the form precision × 10-scale. Annotates Avro bytes or fixed types. Represented with a `java.math.BigDecimal` in generated Java sources.
Imprecise. Double precision (64-bit) IEEE 754 floating-point number
Imprecise. Double precision (64-bit) IEEE 754 floating-point number
Imprecise. Single precision (32-bit) IEEE 754 floating-point number
Imprecise. Single precision (32-bit) IEEE 754 floating-point number
Int: 32-bit signed two's complement integer
Int: 32-bit signed two's complement integer
Represents a date within the calendar, with no reference to a
particular time zone or time of day. Annotates an Avro int, where
the int stores the number of days from the unix epoch, 1 January
1970 (ISO calendar). Represented with org.joda.time.LocalDate
in
generated Java sources.
Represents a date within the calendar, with no reference to a particular time zone or time of day. Annotates an Avro int, where the int stores the number of days from the unix epoch, 1 January 1970 (ISO calendar). Represented with `org.joda.time.LocalDate` in generated Java sources.
This logical type is supported as is with no overloading of its
underlying type. It is currently unknown to package
org.apache.avro/LogicalTypes
so should probably be used with
caution. You're alone; good luck.
Represents an amount of time defined by a number of months, days and
milliseconds. This is not equivalent to a number of milliseconds,
because, depending on the moment in time from which the duration is
measured, the number of days in the month and number of milliseconds
in a day may differ. Other standard periods such as years, quarters,
hours and minutes can be expressed through these basic
periods. Annotates Avro fixed type of size 12, which stores three
little-endian unsigned integers that represent durations at
different granularities of time. The first stores a number in
months, the second stores a number in days, and the third stores a
number in milliseconds. Represented with custom named type
fixed(12)
in generated Java sources.
This logical type is supported as is with no overloading of its underlying type. It is currently unknown to package `org.apache.avro/LogicalTypes` so should probably be used with caution. You're alone; good luck. Represents an amount of time defined by a number of months, days and milliseconds. This is not equivalent to a number of milliseconds, because, depending on the moment in time from which the duration is measured, the number of days in the month and number of milliseconds in a day may differ. Other standard periods such as years, quarters, hours and minutes can be expressed through these basic periods. Annotates Avro fixed type of size 12, which stores three little-endian unsigned integers that represent durations at different granularities of time. The first stores a number in months, the second stores a number in days, and the third stores a number in milliseconds. Represented with custom named type `fixed(12)` in generated Java sources.
Represents a time of day, with no reference to a particular calendar,
time zone or date, with a precision of one microsecond. Annotates
an Avro long, where the long stores the number of microseconds after
midnight, 00:00:00.000000. Represented with primitive long
in
generated Java sources.
Represents a time of day, with no reference to a particular calendar, time zone or date, with a precision of one microsecond. Annotates an Avro long, where the long stores the number of microseconds after midnight, 00:00:00.000000. Represented with primitive `long` in generated Java sources.
Represents a time of day, with no reference to a particular calendar,
time zone or date, with a precision of one millisecond. Annotates an
Avro int, where the int stores the number of milliseconds after
midnight, 00:00:00.000. Represented with org.joda.time.LocalDate
in generated Java sources.
Represents a time of day, with no reference to a particular calendar, time zone or date, with a precision of one millisecond. Annotates an Avro int, where the int stores the number of milliseconds after midnight, 00:00:00.000. Represented with `org.joda.time.LocalDate` in generated Java sources.
Represents an instant on the global timeline, independent of a
particular time zone or calendar, with a precision of one
microsecond. Annotates an Avro long, where the long stores the
number of microseconds from the unix epoch, 1 January 1970
00:00:00.000000 UTC. Represented with primitive long
generated
Java sources.
Represents an instant on the global timeline, independent of a particular time zone or calendar, with a precision of one microsecond. Annotates an Avro long, where the long stores the number of microseconds from the unix epoch, 1 January 1970 00:00:00.000000 UTC. Represented with primitive `long` generated Java sources.
Represents an instant on the global timeline, independent of a
particular time zone or calendar, with a precision of one
millisecond. Annotates an Avro long, where the long stores the
number of milliseconds from the unix epoch, 1 January 1970
00:00:00.000 UTC. Represented with org.joda.time.DateTime
in
generated Java sources.
Represents an instant on the global timeline, independent of a particular time zone or calendar, with a precision of one millisecond. Annotates an Avro long, where the long stores the number of milliseconds from the unix epoch, 1 January 1970 00:00:00.000 UTC. Represented with `org.joda.time.DateTime` in generated Java sources.
These args are not meant to be your default choice, but they are somehow convenient to use.
These args are not meant to be your default choice, but they are somehow convenient to use.
Spec not to be infered. Useful if you want to use some custom specs. Used by to-spec! to keep track of specs and register a spec only once.
Spec not to be infered. Useful if you want to use some custom specs. Used by to-spec! to keep track of specs and register a spec only once.
(-qualify-map schema args)
Recursively qualify keys of a map to match some schema namespace.
Recursively qualify keys of a map to match some schema namespace.
(qualify-map value schema explicit-union-types)
Recursively qualify keys of a map to match some schema
namespace. Example dumb explicit-union-types
:
(fn [possible-types path value]
(if value
(last possible-types)
(first possible-types)))
Recursively qualify keys of a map to match some schema namespace. Example dumb `explicit-union-types`: ``` clojure (fn [possible-types path value] (if value (last possible-types) (first possible-types))) ```
(to-spec! this args)
Recursively infer and register spec of record-schema and any nested schemas.
Recursively infer and register spec of record-schema and any nested schemas.
Recursively unqualify keys of a map, provided they're keyword.
Recursively unqualify keys of a map, provided they're keyword.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close