Questions tagged [supabase-database]

Supabase is a database solution powered by PostgreSQL. Under the hood, Supabase uses PostgREST, an open source tool to make automatically create REST API for PostgreSQL databases. Supabase utilizes row level security feature on top of PostgREST to provide authorization. Use this tag when you are having problems, and not to ask for new features.

Supabase Database is a component of Supabase that automatically creates RESTful APIs for your Supabase database backed by PostgreSQL. Under the hood, Supabase uses PostgREST, an open source tool to create REST APIs for your PostgreSQL database. Supabase utilizes row level security feature on top of PostgREST to provide authorization. Use this tag when you are having problems, and not to ask for new features.

Supabase Database comes with:

  • intuitive table editor
  • clients in various languages to communicate with the database
  • SQL editor to easily run SQL on your database
330 questions
0
votes
1 answer

supabase auth-helpers-nextjs package not working properly

I am using supabase auth helper package in my project. When the user enters the login details it should be redirected to the order page. I am using supabase auth condition in the order page. But when the user enters the login details it is not…
0
votes
1 answer

in flutter, How can I read data reactively with getx + supabase(1.0.0-dev.4)?

I am currently using Supabase version 1.0.0-dev.4. However, I am not sure how to read the data in realtime (via get). The emulator only shows a white screen. I'd be really happy if this could be resolved. Please Help me!! Please Help me!! Please…
0
votes
1 answer

UPDATE RLS in Supabase seems broken

I am trying to set up RLS to a table in Supabase that will only allow the authenticated user to UPDATE their row on users table. I have opted to use Supabase on my server rather than the front-end. My current workflow is as follows: Client requests…
Craig Howell
  • 1,114
  • 2
  • 12
  • 28
0
votes
1 answer

postgreSQL - how can i return all rows from 3 tables?

im actually a frontend developer not a backend developer. so believe me, its really hard for me to work with postgreSQL and i searched a lot for my question but i couldnt find exactly what i want. i want to create a query in supabase that returns…
Saman
  • 171
  • 13
0
votes
0 answers

How do I download a .PNG using javascript script from a storage bucket in Supabase

I am trying to download a .png I have stored in my Supabase database using a javascript script. I have read the documentation and used the code snippet they provided but https://supabase.com/docs/reference/javascript/storage-from-download#notes What…
CosimoV
  • 283
  • 1
  • 4
  • 9
0
votes
1 answer

How to update data in supabase having one to many relation?

I am working on a smaller project. I have two tables e.g. properties and agents. One property can have many agents. How can I update data in both tables using one query? Here is the link to update data in postgres How I can update one to many…
umar muaz
  • 1
  • 1
0
votes
1 answer

Supabase order by foreign key count in select

I'm trying to figure out how to sort query results using supabase to do something like this: await supabase.from("groups").select('*, items(id)').order('count(items)'); Basically, sort resulting groups by the number of associated items (group has…
bryce
  • 3,022
  • 1
  • 15
  • 19
0
votes
2 answers

How to use Supabase streams to query "IS NOT NULL" where clause

How do I make the following query in supabase on a stream listening for changes: select * from public.messages where "to" IS NOT NULL; From the documentation the closest, I could get was doing the filtering with an "equal to" expression. As…
The Nerdy Geek
  • 342
  • 5
  • 16
0
votes
1 answer

Supabase: Query all rows in which either of two child relations contains property

Let's say I own a bunch of malls that have stores and restaurants. I want to query for all malls in which at least 1 store OR at least 1 restaurants is open There are three tables, malls, stores and restaurants. malls id name mall 1 Josh's…
0
votes
1 answer

How to create Postgres statement that updates or inserts objects into json array?

I'm working with Supabase which has the ability to create database functions. In a table, I have a json column which holds an array of simple objects, that are tracking a user's onboarding completion. The json array might look something like…
J. Jackson
  • 3,326
  • 8
  • 34
  • 74
0
votes
1 answer

How to insert shopping cart items to supabase

I have successfully added a row in a table called "order" that has the user information, I would like to add the items details individually to a separate table called "order_storeItems" that will be a relationship between the order table and the…
0
votes
0 answers

Self hosting Supabase using Postgres

I am trying to self host Supabase with Postgersql (AWS RDS). I have got the db up and running. I download their docker diretory. It's working fine with the default settings, but when I do it with my postgreSQL, supabase-auth doesnt seem to work. It…
Yash
  • 223
  • 2
  • 11
0
votes
1 answer

Data from Supabase JOIN query in Sveltekit appears in the browser console, but is null when I try to use it

So I have a supabase select query with a JOIN that seems to be working when I log the results to console in the browser, but when I try to use the data from the JOIN, the result is null. The data also shows as null in the terminal console log. Here…
0
votes
1 answer

How to design security policies for a following system including counters in postgres/supabase if postgres functions are used?

I am unsure how to design security policies for a following system including counters in postgres/supabase. My database includes two tables: Users: uuid|name|follower_counter ------------------------------ xyz |tobi| …
0
votes
3 answers

Why is my env variable showing up as undefined?

I'm trying to get data from a table with Supabase. When I try store the URL and the Key on a .env file it comes back as undefined. File: App.js import React, { useEffect } from "react"; import ButtonsSection from "./ButtonsSection"; import Header…