LanceDB.JSON (LanceDB v0.2.0)

Copy Markdown View Source

Explicit JSON values for :json schema fields, stored using Lance's native JSONB.

Maps, lists, strings, numbers and booleans may be written directly to JSON fields. nil means SQL NULL; LanceDB.JSON.null/0 means the JSON value null. Reads return ordinary Elixir values, with %LanceDB.JSON{value: nil} preserving JSON null at the column level. Nulls inside JSON objects and arrays remain ordinary nil. new/1 is also useful to mark an entire JSON value explicitly.

Object keys must be unique strings or atoms; strings must be valid UTF-8. Arbitrary structs and binaries containing invalid UTF-8 are not JSON values.

Summary

Functions

Builds a validated JSON value. Invalid values raise ArgumentError.

Returns a JSON null, distinct from a nullable field's SQL NULL.

Types

t()

@type t() :: %LanceDB.JSON{value: term()}

Functions

new(value)

@spec new(term()) :: t()

Builds a validated JSON value. Invalid values raise ArgumentError.

null()

@spec null() :: t()

Returns a JSON null, distinct from a nullable field's SQL NULL.