Default source resolver that reads from static data_sources configuration.
Resolution priority:
source_optas string name — lookup in data_sources, wrap in adaptersource_optas module — reverse lookup (find name for module), wrap in adapterfallbackas string name — lookupfallbackas module — reverse lookup- Both nil — use
Config.default_data_source() - Not found —
{:error, :not_found}
Entry forms
A :data_sources entry is one of:
an
Ecto.Repomodule — matched against the built-in Ecto adapters by the repo's Ecto adapter, falling back to the generic Ecto adapter.%{adapter: MyAdapter, ...}— the canonical form. The named module is used directly; the whole map is passed to itswrap/2as state. Prefer this: it is explicit, skipscan_handle?/1probing, and cannot become ambiguous.any other term — offered to each module in
:source_adaptersviacan_handle?/1. Exactly one must claim it. If several do, resolution raises rather than silently picking the first; name the adapter in the entry to settle it.