Lotus.Normalizer protocol (Lotus v0.16.4)

Copy Markdown View Source

Protocol for normalizing raw database values into JSON-safe, displayable forms.

Lotus applies this protocol to all query result values before they reach consumers (UI, exports, API). Implement this protocol for custom database types that need special handling.

Summary

Types

t()

All the types that implement this protocol.

Functions

Normalize a value so it is JSON-safe and human-readable.

Types

t()

@type t() :: term()

All the types that implement this protocol.

Functions

normalize(value)

@spec normalize(t()) :: term()

Normalize a value so it is JSON-safe and human-readable.