View Source Supabase.PostgREST.Behaviour behaviour (supabase_postgrest v0.2.0)

Defines the interface for the main module Supabase.PostgREST

Summary

Types

media_type()

@type media_type() ::
  :json
  | :csv
  | :openapi
  | :geojson
  | :pgrst_plan
  | :pgrst_object
  | :pgrst_array

Callbacks

execute(arg1)

@callback execute(Supabase.PostgREST.Builder.t() | Supabase.PostgREST.Builder.t()) ::
  {:ok, term()} | {:error, Supabase.PostgREST.Error.t()}

execute_string(arg1)

@callback execute_string(Supabase.PostgREST.Builder.t() | Supabase.PostgREST.Builder.t()) ::
  {:ok, binary()} | {:error, Supabase.PostgREST.Error.t() | atom()}

execute_to(arg1, atom)

@callback execute_to(
  Supabase.PostgREST.Builder.t() | Supabase.PostgREST.Builder.t(),
  atom()
) ::
  {:ok, term()} | {:error, Supabase.PostgREST.Error.t() | atom()}

execute_to_finch_request(arg1)

@callback execute_to_finch_request(
  Supabase.PostgREST.Builder.t()
  | Supabase.PostgREST.Builder.t()
) ::
  Finch.Request.t()

from(t, relation)

@callback from(Supabase.Client.t(), relation :: String.t()) ::
  Supabase.PostgREST.Builder.t()

schema(t, schema)

with_custom_media_type(builder, media_type)

@callback with_custom_media_type(builder, media_type()) :: builder
when builder: Supabase.PostgREST.Builder.t() | Supabase.PostgREST.Builder.t()