Skip to main content

encode_literal

Function encode_literal 

Source
pub fn encode_literal(
    literal: &Literal,
) -> (EncodedTerm, Vec<(StrHash, Vec<u8>)>)
Expand description

Encode a geo literal for the datatype map: native term on success, the same hashed typed literal storage From<&Literal> would produce on any failure (ingest and query constants cannot diverge — one path).

On native success the mint’s content-addressed payload pairs (blob_id → canonical CRS84 EWKB) are returned alongside the term: the query-const seeding installs them in the query-local blob map (query constants never reach the registry blob store, so the pairs are the only copy of the payload — the geo relate loop’s fetch reads them there). Ingest takes the same pairs from [PreparedGeometryLiteral] and writes them to the store.