[B4X] Supabase - The Open Source Firebase alternative
Supabase is an open source Firebase alternative. It provides all the backend services you need to build a product. Supabase uses Postgres database with real-time capabilities. Basically, supabase provides an interface to manage postgres database that you can use to create table and insert, edit...
www.b4x.com
This is a simple B4X chat example with supabase as backend.
Setup Supabase
Create dt_Rooms:
create table
public."dt_Rooms" (
id bigint generated by default as identity,
name text not null,
created_at timestamp without time zone not null default now(),
created_by uuid not null default auth.uid (),
constraint dt_Rooms_pkey primary key (id),
constraint dt_Rooms_created_by_fkey foreign key (created_by) references auth.users (id)
) tablespace pg_default;
Create dt_Chat:
create table
public."dt_Chat" (
id bigint generated by default as identity,
room_id bigint not null,
created_at timestamp without time zone not null default now(),
created_by uuid not null default auth.uid (),
message character varying not null,
constraint dt_Chat_pkey primary key (id),
constraint dt_Chat_created_by_fkey foreign key (created_by) references users (id),
constraint dt_Chat_room_id_fkey foreign key (room_id) references "dt_Rooms" (id) on delete cascade
) tablespace pg_default;
Supabase table joins with auth.users
Can we do a join with a table in a schema that is not public? for example, join the auth.user with Public.user? If not, are there any work arounds? Thank you.
www.b4x.com
Libraries
Have Fun
Attachments
Last edited: