Arex.Options (arex v0.1.0)

Copy Markdown View Source

Internal option normalization and precedence rules.

Resolution order is:

  1. per-call options
  2. application config for :arex
  3. environment variables for url, user, pwd, and db

language is not env-backed. It comes from call options or application config and otherwise defaults to "sql".

The resolved output is the internal options map used throughout Arex. This module validates boundary rules, normalizes string-like values, sanitizes transport options, and ensures callers cannot bypass retry policy through nested Req configuration.

Arex.Options is public mainly for transparency and extension work. Typical application code should pass ordinary keyword lists to the public helpers and let those helpers resolve options internally.

Use this module directly only when you are extending Arex or building wrapper layers that need to mirror the library's exact precedence and validation rules.

Summary

Functions

Resolves Arex options into Arex's internal options map.

Removes Req retry settings so callers cannot bypass Arex retry rules.

Functions

resolve(resolved)

Resolves Arex options into Arex's internal options map.

Already-resolved maps are returned unchanged. Keyword-list input is validated, merged with config and environment fallback values, and normalized so connection-related values become strings internally.

sanitize_req_options(req_options)

Removes Req retry settings so callers cannot bypass Arex retry rules.

This is applied before req_options are merged into the transport request.