Supabase.PostgREST.QueryBuilder.Behaviour behaviour (supabase_postgrest v1.2.2)

View Source

Defines the interface for the QueryBuilder module

Summary

Types

agg_opt()

@type agg_opt() :: {:as, column()}

column()

@type column() :: String.t() | atom()

insert_options()

@type insert_options() :: [
  count: :exact,
  returning: boolean() | :representation,
  on_conflict: any()
]

options()

@type options() :: [count: :exact, returning: boolean() | :representation]

Callbacks

avg(column, list)

@callback avg(column(), [agg_opt()]) :: String.t()

count(column, list)

@callback count(column(), [agg_opt()]) :: String.t()

delete(t)

delete(t, options)

insert(t, map)

insert(t, map, insert_options)

max(column, list)

@callback max(column(), [agg_opt()]) :: String.t()

min(column, list)

@callback min(column(), [agg_opt()]) :: String.t()

select(t, arg2)

select(t, arg2, options)

sum(column, list)

@callback sum(column(), [agg_opt()]) :: String.t()

update(t, map)

update(t, map, options)

upsert(t, map)

upsert(t, map, insert_options)