GeoGenius.Stores.Postgres (geo_genius v0.2.0)

Copy Markdown View Source

Every read is one call to a SQL function in the installed schema, with every optional argument bound explicitly, so a read never inherits a default from the database that differs from the one the library documents.

A host reaches this through GeoGenius.Context; configuring :store is what replaces it.

Summary

Functions

Normalises a release id into the sixteen raw bytes Postgrex binds to a uuid parameter. Accepts either that already-dumped binary or the hyphenated string every read projects and release_at/3 returns, so a caller can feed one read's release id into the next read's :release_id regardless of which layer produced it. GeoGenius.Query binds :release_id through this same function rather than reimplementing the shape check.

Functions

dump_uuid(release_id)

@spec dump_uuid(String.t() | binary() | nil) :: binary() | nil

Normalises a release id into the sixteen raw bytes Postgrex binds to a uuid parameter. Accepts either that already-dumped binary or the hyphenated string every read projects and release_at/3 returns, so a caller can feed one read's release id into the next read's :release_id regardless of which layer produced it. GeoGenius.Query binds :release_id through this same function rather than reimplementing the shape check.