Marky
08/11/2021, 1:34 AM__ianjasper
08/11/2021, 2:06 AMScott P
08/11/2021, 2:07 AM(uid() = user_id)
(if user_id
is the name of the column where the user ID is stored)__ianjasper
08/11/2021, 2:09 AMScott P
08/11/2021, 2:15 AMBEFORE INSERT
trigger. The function that's triggered could do something like this:
sql
INSERT INTO public.some_table (column_1, is_public, user_id)
VALUES ("Some string value", true, auth.uid());
Scott P
08/11/2021, 2:16 AMuser_id
isn't nullable. If it's allowed to be nullable, then an after insert trigger could do the same job__ianjasper
08/11/2021, 2:17 AM__ianjasper
08/11/2021, 2:17 AM__ianjasper
08/11/2021, 2:18 AMScott P
08/11/2021, 2:23 AMnew.some_value
as values, which are useful if the trigger is running on a `BEFORE INSERT`:
sql
CREATE OR REPLACE FUNCTION public.insert_article()
RETURNS trigger
LANGUAGE plpgsql
SECURITY DEFINER AS $$
begin
INSERT INTO public.some_table
(column_1, is_public, user_id, article_title, article_date)
values
('some string value', true, auth.uid(), new.article_title, new.article_date);
return new;
end;
$$;
(That specific example might need some tweaking to work, but the general idea is there)__ianjasper
08/11/2021, 2:31 AMXyo
08/11/2021, 3:57 AMXyo
08/11/2021, 3:58 AMXyo
08/11/2021, 3:58 AM__ianjasper
08/11/2021, 4:22 AM__ianjasper
08/11/2021, 4:22 AM__ianjasper
08/11/2021, 4:22 AMXyo
08/11/2021, 4:23 AMXyo
08/11/2021, 4:23 AMXyo
08/11/2021, 4:24 AM__ianjasper
08/11/2021, 4:26 AMdart
final userAttributes = UserAttributes(password: _password);
final response =
await Supabase.instance.client.auth.update(userAttributes);
dang im looking
dart
Supabase.instance.client.auth.changePassword('');
TheOriginalDude
08/11/2021, 5:07 AMbim
08/11/2021, 8:57 AMsilentworks
08/11/2021, 11:50 AMThisIsJustin
08/11/2021, 3:14 PMAdamo
08/11/2021, 4:03 PMSteve
08/11/2021, 4:07 PMflorian-lefebvre
08/11/2021, 4:48 PMAdamo
08/11/2021, 4:49 PMerik_flywheel
08/11/2021, 6:54 PM