TheBuilderJR
02/22/2023, 9:34 AMSoluxos
02/22/2023, 10:40 AMlake_mattiato
02/22/2023, 10:54 AMhoj
02/22/2023, 11:08 AMRecipes
----
id
created_by
Favorites
----
id
user_id
recipe_id
I would like to return all recipes that have either been created_by, or favorited by a userbpeck81_
02/22/2023, 11:39 AMcryptoneur
02/22/2023, 12:01 PMeqoram
02/22/2023, 12:42 PMBenXk
02/22/2023, 12:43 PMDembe
02/22/2023, 12:47 PMjs
supabase.js file
import { createClient } from "@supabase/supabase-js";
export default createClient(
process.env.NEXT_PUBLIC_SUPABASE_URL,
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY
);
js
data file
import { supabase } from "../../utils/supabase";
useEffect(() => {
const getEntries = async () => {
const { data, error } = await supabase.from("countries").select();
console.log(data);
};
getEntries();
}, []);
`
But i'm getting that error from this.is farish
02/22/2023, 1:15 PMsupabase
locally (via supabase start
), it "kills" Dockeranilduri [34]
02/22/2023, 1:25 PMdev Joakim Pedersen
02/22/2023, 2:28 PMDEPRECATION NOTICE: GOTRUE_JWT_DEFAULT_GROUP_NAME not supported by Supabase's GoTrue, will be removed soon
DEPRECATION NOTICE: GOTRUE_JWT_ADMIN_GROUP_NAME not supported by Supabase's GoTrue, will be removed soon
They usually follow up right after this error.
prometheus server (0.0.0.0:9122) shut down
So it seems that a server shuts down. and it boots up again right after, and then I get these warnings.
Probably nothing but thought it wise to share
Hope anyone got a idea, bit rough without registration working :/snagna
02/22/2023, 2:51 PMinterfacelab
02/22/2023, 3:40 PMselect posts.*, heat_score(column_a, date_created) as heat_score from posts;
Where heat_score()
is a postgres function.
Views don't work here because I need to do some joins.Sarcodo
02/22/2023, 3:43 PMseed.sql
file to create sample data, however I can't login with the sample user I created to be able to see the users data. Is there a way to create a user with an encrypted password via the seed script, or is there another alternative way of doing this?Unknown Member
02/22/2023, 3:51 PMSoluxos
02/22/2023, 4:06 PMfadethegap
02/22/2023, 4:15 PMCREATE POLICY "Only Authenticated users can Insert" ON public.profile FOR INSERT WITH CHECK ((role() = 'authenticated'::text));
It resulted in this error:
Failed to run sql query: function role() does not exist
I used the sql from a previous project, which worked fine. Is there a setting I need to change?Jarvis
02/22/2023, 4:25 PMbegin
-- increment the number_of_ratings for this user
UPDATE public.profiles
SET number_of_reviews = number_of_reviews + 1
WHERE id=(new.reviewee.id::text)::uuid;
-- update user overall rating by averaging
return new;
end;
As a first step, I just want to increment the total number of reviews, but I'm getting this error:
{code: '42P01', details: null, hint: null, message: 'missing FROM-clause entry for table "reviewee"'}
My mental model is obviously broken here because I don't understand why I need a FROM or how I would use it since I'm not using any information from the reviewee table. š¤
When I run this query, I get the intended result:
UPDATE public.profiles
SET number_of_reviews = number_of_reviews + 1
WHERE id=''
I could really use some adult supervision here, especially for fixing my mental model and (hopefully) finding pithy documentation for plpgsql functions.
I'm obviously a noob, and I GREATLY appreciate help!
Thank you!Domcario
02/22/2023, 4:33 PM_jsonb
because this is an array? wondering how i would be able to get the same edit jsonb button as above. mainly so i can view the jsonb contents in that nice window the dashboard hasdrewbie
02/22/2023, 4:53 PMMonimolimnion
02/22/2023, 5:09 PMorders
table in my SB database ready to go, but I'm not sure what security policy to use. I don't have users as such, the app just needs to insert into the database 'by itself'. The only template for inserting data in the dashboard is for authenticated users.jj_sessa
02/22/2023, 5:11 PMLucasReinaldo
02/22/2023, 5:14 PMaleemrehmtulla
02/22/2023, 5:53 PMadmin
serverside stuff.
how can i do the same with supabase? trying to implement figma auth :D
so basically want to sign in a user from serverside without their auth if that makes senseR1ky68
02/22/2023, 6:02 PMalex-visto
02/22/2023, 6:04 PM/auth/v1/token?grant_type=password
It returns: status_code 504 The upstream server is timing out
We have tried rebooting our Supabase project, rebooted our servers, and the issue persists.
We do use Cloudflare, and I am pretty sure Supabase uses Cloudflare as well, as we have be intermittently getting Cloudflare errors when loading our frontend app.
Is anyone else experiencing this currently?Guille
02/22/2023, 6:20 PMjh
02/22/2023, 7:09 PMts
orQuery.push(`name.ilike.%${q}%,address->>"street".ilike.%${q}%`);
This works fine when I want to find a person whose name is 'blah' or live on the street 'blah'. Note, that the column 'address' is also a JSONB object, just not an array. I tried adding the following:
ts
orQuery.push(`name.ilike.%${q}%,address->>"street".ilike.%${q}%,contacts->>"name".ilike.%${q}%`);
This however, fails. Any suggestions?StartupDevDG
02/22/2023, 7:14 PM