Skip to content

Commit

Permalink
release: 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zoedsoupe committed Jan 15, 2025
1 parent e3e1513 commit 6cd9582
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Add the following dependencies to your `mix.exs` file:
```elixir
def deps do
[
{:supabase_potion, "~> 0.5"},
{:supabase_postgrest, "~> 0.2"}
{:supabase_potion, "~> 0.6"},
{:supabase_postgrest, "~> 1.0"}
]
end
```
Expand Down
5 changes: 3 additions & 2 deletions lib/supabase/postgrest/transform_builder.ex
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,14 @@ defmodule Supabase.PostgREST.TransformBuilder do
https://supabase.com/docs/reference/javascript/db-modifiers-select
"""
@impl true
def returning(%Request{} = b) do
def returning(builder, columns \\ [])

def returning(%Request{} = b, []) do
b
|> Request.with_query(%{"select" => "*"})
|> Request.merge_req_header("prefer", "return=representation")
end

@impl true
def returning(%Request{} = b, columns) when is_list(columns) do
cols =
Enum.map_join(columns, ",", fn c ->
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule PostgREST.MixProject do
def project do
[
app: :supabase_postgrest,
version: "0.2.0",
version: "1.0.0",
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
deps: deps(),
Expand Down

0 comments on commit 6cd9582

Please sign in to comment.