One media type of an Accept header, as PostgREST understands it.
kind is what PgRest can answer: :json (application/json), :object
(application/vnd.pgrst.object[+json]), :array (application/vnd.pgrst.array[+json]),
:csv (text/csv), :plan (application/vnd.pgrst.plan[+json|+text]), :any (*/*) or
:other. Matching is case-insensitive. raw is the type as the client wrote it with the q
parameter dropped (it is what a PGRST107 lists). nulls_stripped? is the nulls=stripped
parameter, valid on :array and :object only. plan is set for :plan: its format, the
media type it is for (application/json when the client names none) and its options, in
PostgREST's order (analyze, verbose, settings, buffers, wal). A plan's raw is
PostgREST's canonical name for it, application/vnd.pgrst.plan+<format>; for="<type>" and
; options=<a>|<b> when there are any: what a PGRST107 lists and the response echoes.
Summary
Functions
The */* any type, what a missing Accept header means.
The media type a statement answers in: the type itself, application/json for */*, and for
a plan the type it is for, so an explained statement is the one that would run for it.
The Content-Type of a response in this media type. The stripped types name the parameter
as PostgREST does; an :array that is not stripped is plain JSON. Error bodies are always
application/json.
The default, application/json.
Types
@type kind() :: :json | :object | :array | :csv | :plan | :any | :other
@type plan() :: %{format: :text | :json, for: t(), options: [plan_option()]}
@type plan_option() :: :analyze | :verbose | :settings | :buffers | :wal
Functions
@spec any() :: t()
The */* any type, what a missing Accept header means.
The media type a statement answers in: the type itself, application/json for */*, and for
a plan the type it is for, so an explained statement is the one that would run for it.
The Content-Type of a response in this media type. The stripped types name the parameter
as PostgREST does; an :array that is not stripped is plain JSON. Error bodies are always
application/json.
@spec json() :: t()
The default, application/json.