Pure address query normalisation and hashing — no I/O, no side effects.
Pure address query normalisation and hashing — no I/O, no side effects.
(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.
(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.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |