Squirrelix.Postgres (Squirrelix v0.5.1)

Copy Markdown View Source

Postgrex-backed query inferrer.

Supported public API

Other functions in this module are internal and may change without notice. Connection resolution for Mix tasks is documented in the Configuration guide; do not call Mix-oriented helpers from application code.

Summary

Functions

Returns an inferrer function for Squirrelix.generate/3 / check/3.

Functions

inferrer(conn)

@spec inferrer(Postgrex.conn()) :: Squirrelix.Inference.inferrer()

Returns an inferrer function for Squirrelix.generate/3 / check/3.

The returned function takes a Squirrelix.Query and returns {:ok, [params: ..., returns: ...]} or {:error, structured_error}.