Postgrex v0.11.1 Postgrex.Query

Query struct returned from a successfully prepared query. Its fields are:

  • name - The name of the prepared statement;
  • statement - The prepared statement;
  • param_formats - List of formats for each parameters encoded to;
  • encoders - List of anonymous functions to encode each parameter;
  • columns - The column names;
  • result_formats - List of formats for each column is decoded from;
  • decoders - List of anonymous functions to decode each column;
  • types - The type server table to fetch the type information from;
  • null - Atom to use as a stand in for postgres’ NULL;

Summary

Types

t :: %Postgrex.Query{columns: [String.t] | nil, decoders: [Postgrex.Types.oid] | [(binary -> term)] | nil, encoders: [Postgrex.Types.oid] | [(term -> iodata)] | nil, name: iodata, null: atom, param_formats: [:binary | :text] | nil, result_formats: [:binary | :text] | nil, statement: iodata, types: Postgrex.TypeServer.table | nil}