user
09/06/2021, 1:40 AMuser
09/06/2021, 1:41 AMuser
09/06/2021, 1:41 AMsomeBucket.columnIds.map(id => getColumn(id))
stibbs
09/06/2021, 1:43 AMjavascript
await supabase.from('columns').select('*').eq('bucket_id', id);
stibbs
09/06/2021, 1:43 AMuser
09/06/2021, 5:23 PMSETY
09/06/2021, 9:40 PMSETY
09/06/2021, 9:46 PMSETY
09/06/2021, 9:59 PMSETY
09/06/2021, 9:59 PMSETY
09/06/2021, 10:00 PMSETY
09/06/2021, 10:26 PMSETY
09/06/2021, 10:26 PMburggraf
09/06/2021, 11:32 PMauth
schema from the client.burggraf
09/06/2021, 11:33 PMview
or a create a function
to access auth.users
and then call the function with .rpc()
.user
09/06/2021, 11:55 PMstibbs
09/07/2021, 4:08 AMstibbs
09/07/2021, 4:09 AMpublic.users
table has a FK referencing public.roles
table. Then you can lock down the roles table?stibbs
09/07/2021, 4:17 AMsyntax error at or near "returning"
public.users
sql
CREATE TABLE users (
id bigint generated by default as identity primary key,
user_id uuid references auth.users,
);
function
sql
...
insert into public.users returning id into new_user_id;
...
Right now, all I want it to do is create a record with an auto-generated PK and a user_id of nulljason-lynx
09/07/2021, 4:23 AMjason-lynx
09/07/2021, 4:23 AMjason-lynx
09/07/2021, 4:23 AMinsert into public.users(id, ...) values(...
jason-lynx
09/07/2021, 4:27 AMauth.users
directly?stibbs
09/07/2021, 4:34 AMid
I need to specify? What value do I pass?
sql
insert into public.users (id) values () returning id into new_user_id;
stibbs
09/07/2021, 4:35 AMstibbs
09/07/2021, 4:39 AMsql
insert into public.users default values returning id into new_user_id;
gets me past that error and onto a new one 🙂stibbs
09/07/2021, 5:05 AMts
let { data, error } = await supabase.rpc('new_job_post', {...})
error
ts
{"hint":"To call a procedure, use CALL.","message":"public.new_job_post(...) is a procedure","code":"42809","details":null}
Oh I think it needs to be a function rather than a procedure?jason-lynx
09/07/2021, 5:56 AMjason-lynx
09/07/2021, 5:56 AMCREATE FUNCTION
syntax