JayStavis
12/23/2021, 8:47 PMevent_count
table.
I create a function in the SQL Editor:
sql
create function increment (event_type text, incrementvalue int)
returns void as
$$
update event_count
set count = count + incrementvalue
where event_type = event_type
$$
language sql volatile
and I call this function from client js:
js
export const incrementEvent = async ({event_type}) => {
const { data, error } = await supabase
.rpc('increment', {event_type : event_type, incrementvalue : 1}); // value is amount to increment by
if (error) console.log(error.message)
return data
}
However, I get this console.log() error message:
Could not find the public.increment(incrementvalue) function or the public.increment function with a single unnamed json or jsonb parameter in the schema cache
Any ideas? I couldn't figure out how to update the schema cache, but in the Supabase WebUI --> Database --> Functions I definitely have the increment function in the public
schema.aresnick
12/23/2021, 10:13 PMpostgres
to supabase_admin
and supabase_auth_admin
, it seems that things like adding event triggers won't be possible without being a superuser.
Is this right? There's no way to clone an existing Supabase DB for purposes of staging?Frank P
12/24/2021, 3:46 AMVillage
12/24/2021, 6:33 AMthyme
12/24/2021, 8:09 AMjaf
12/24/2021, 9:41 AMuser_id
that references auth.users.id
(foreign key). What do I need to do to autofill that column based on the authenticated user? I'm using JS: const { data, error } = await supabase.from('table').insert([{ item: item }])
HugoRaynal
12/24/2021, 9:58 AMAnoushk
12/24/2021, 10:22 AMAnoushk
12/24/2021, 10:22 AMktosiek
12/24/2021, 10:42 AM#type=...
redirects?sanketc
12/24/2021, 4:34 PMError: getaddrinfo ENOTFOUND postgres
when I try to access supabase studio after docker-compose. I do have the env file that has the right postgres pw and port info, what else could I be doing wrong?TremalJack
12/24/2021, 6:06 PMTremalJack
12/24/2021, 6:07 PMMaz
12/24/2021, 6:44 PMsupabase.auth.api.getUserByCookie(req)
(using next.js), and on the client I'm using supabase.auth.user()
.
What often happens is in a pretty short time period after authentication (30 mins or so), the getUserByCookie
starts returning null, but supabase.auth.user()
correctly resolves the user on the client.
I still have the sb:token cookie and it's not expired yet, so I'm confused why that's not working
Any idea what I might be doing wrong?Maz
12/24/2021, 6:46 PMFrank P
12/24/2021, 8:23 PMFrank P
12/24/2021, 9:17 PMFrank P
12/24/2021, 9:19 PMExample
var response = await _client.Auth.SignUp(email, password,
new Dictionary<string, object> {
{ "full_name", "John Doe" },
{ "first_name", "John" },
{ "last_name", "Doe" },
{ "number", 10 },
{ "FullName", "John Doe" },
{
"redirectTo", "https://google.com"
}
});
tourdownunder
12/24/2021, 11:01 PMjs
var response = await _client.Auth.SignUp(
{
email:"john.dow@example.com",
password:"mypassword",
},
{
data :{
full_name: "John Doe",
first_name: "John",
last_name: "Doe",
}
}
);
birdiewd
12/24/2021, 11:36 PMFrank P
12/24/2021, 11:38 PMtourdownunder
12/24/2021, 11:40 PMMuphet
12/24/2021, 11:40 PMUncaught tried to push 'access_token' to 'realtime:public:profile' before joining. Use channel.subscribe() before pushing events
birdiewd
12/24/2021, 11:42 PMtourdownunder
12/24/2021, 11:46 PMbirdiewd
12/24/2021, 11:49 PMbirdiewd
12/25/2021, 1:36 AM?error=server_error&error_description=Error+getting+user+email+from+external+provider
Here are my settings in twitters dev portal:birdiewd
12/25/2021, 1:50 AMAnoushk
12/25/2021, 5:40 AMAnoushk
12/25/2021, 5:40 AM