Liking cljdoc? Tell your friends :D

wagoe.geo.core.address

Pure address query normalisation and hashing — no I/O, no side effects.

Pure address query normalisation and hashing — no I/O, no side effects.
raw docstring

normalize-queryclj

(normalize-query {:keys [address postcode city country]})

Produce a canonical lowercase, trimmed address string from an AddressQuery map.

Fields are joined in a deterministic order: address, postcode, city, country. Missing fields are omitted. Country defaults to "Netherlands" when not provided.

Args: query - AddressQuery map with optional :address :postcode :city :country

Returns: A non-empty lowercase string suitable for hashing.

Produce a canonical lowercase, trimmed address string from an AddressQuery map.

Fields are joined in a deterministic order: address, postcode, city, country.
Missing fields are omitted. Country defaults to "Netherlands" when not provided.

Args:
  query - AddressQuery map with optional :address :postcode :city :country

Returns:
  A non-empty lowercase string suitable for hashing.
sourceraw docstring

query-hashclj

(query-hash query)

Compute a SHA-256 hex digest of the normalised address query.

Used as the primary key in the geo_cache table.

Args: query - AddressQuery map

Returns: 64-character lowercase hex string.

Compute a SHA-256 hex digest of the normalised address query.

Used as the primary key in the geo_cache table.

Args:
  query - AddressQuery map

Returns:
  64-character lowercase hex string.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close