Behaviour for modules that infer SQL query parameters and returned columns.
Part of the supported public API for custom query sources. Prefer
Squirrelix.Postgres.inferrer/1 when connecting to a live database.
Callbacks receive a Squirrelix.Query and must return either:
{:ok, [params: types, returns: columns]}
{:error, structured_error}where types is a list of type atoms (see the Types guide) and columns is a
list of maps with :name, :type, and :nullable? keys — the same shape as
metadata-file entries.
The Mix task uses Squirrelix.Postgres.inferrer/1 when --infer is passed.
See the Configuration guide for connection options.
Summary
Callbacks
@callback infer(Squirrelix.Query.t()) :: {:ok, keyword()} | {:error, struct()}