Skip to main content

encode_user_literal

Function encode_user_literal 

Source
pub fn encode_user_literal(literal: &Literal) -> EncodedTerm
Expand description

Encode a SPARQL/RDF user literal through the plugin datatype map.

The ONE helper every EncodedTerm::from(literal) call site for user literals must go through (plan lowering, FILTER, CONSTRUCT, BIND, VALUES): a claimed datatype routes to the owning plugin’s encode_literal, a miss falls back to the storage-native From<&Literal> (xsd integers, strings, unknown typed literals). xsd:string / rdf:langString stay on the storage path — the geo plugin does not claim them.

Missing a call site (still using raw From) is a bug: the map only decides which plugin, not whether compute remembered the helper.