AshNeo4j.DataLayer.TypeClassifier (AshNeo4j v0.8.1)

Copy Markdown View Source

Type Classifier for AshNeo4j.DataLayer

Summary

Functions

Returns true when the given type is one of the AshGeo geometry-input types (or any user-shipped subtype via use AshGeo.GeoJson etc).

Classifies the type to assist Cast and Dump

Lists invalid types, checked recursively

Merges item constraints for array types.

Functions

ash_geo_type?(type)

Returns true when the given type is one of the AshGeo geometry-input types (or any user-shipped subtype via use AshGeo.GeoJson etc).

AshGeo types are recognised explicitly so the data layer can route spatial attributes through the geo dispatch path — promoting <attr>.json (RFC 7946 GeoJSON STRING canonical) plus indexable companions like <attr>.point or <attr>.bbSW/<attr>.bbNE alongside the canonical form.

Cast and Dump are unchanged for these — the data layer hands Cast a %Geo.*{} struct (decoding the stored JSON beforehand), and AshGeo's identity cast_stored does the rest.

classify(type \\ nil)

Classifies the type to assist Cast and Dump

invalid_types(type, constraints, path \\ [])

Lists invalid types, checked recursively

item_constraints(inner_type, constraints)

Merges item constraints for array types.

neo4j_native?(type)