Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Insert/Update/Update #10

Closed
ghart14 opened this issue Dec 30, 2024 · 4 comments
Closed

Unable to Insert/Update/Update #10

ghart14 opened this issue Dec 30, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@ghart14
Copy link

ghart14 commented Dec 30, 2024

Bug report

Describe the bug

I'm able to perform a Select operation from the table. But anything else is simply returning {:ok, []} with no true "successful" write operation to the table. RLS policies were configured as well as fully turned off to try the write. I also used both api keys.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Created a table "users"
  2. Disabled RLS just for testing (I may not even need it anyways)
  3. Ran this code snippet:
Q.from(client, "users")
    |> Q.insert(%{name: "John Smith", age: "40"}, returning: :representation)
    |> Q.execute()

Expected behavior

I expected a return of {:ok, [some data in here]} but instead continuously get returned {:ok, []}

System information

  • OS: macOS, Debian 11
  • Versions: {:supabase_potion, "> 0.5"},
    {:supabase_postgrest, "
    > 0.1.5"}
@ghart14 ghart14 added the bug Something isn't working label Dec 30, 2024
@zoedsoupe
Copy link
Collaborator

zoedsoupe commented Dec 30, 2024

solved by #6, It just needs a new release to hex.pm, which I'll be doing by today

@zoedsoupe
Copy link
Collaborator

if you wanna to test it, you can point the version to the main branch in your mix.exs, like:
{:supabase_postgrest, github: "supabase-community/postgrest-ex", branch: "main"}

@ghart14
Copy link
Author

ghart14 commented Dec 30, 2024

Thanks!

@zoedsoupe
Copy link
Collaborator

zoedsoupe commented Dec 31, 2024

release v0.2.0 launched!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants