[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
In the following example I make a join into the "public.users" table and need the column "username" from it.
B4X:
Dim Query As Supabase_DatabaseSelect = xSupabase.Database.SelectData
Query.Columns("message,created_by,id, users(username)")
Query.From("dt_Chat")
Query.Filter_Equal(CreateMap("room_id":3))
Wait For (Query.Execute) Complete (DatabaseResult As SupabaseDatabaseResult)
For Each Row As Map In DatabaseResult.Rows
AddItem(Row.Get("message"), Row.Get("created_by") = User.Id,Row.Get("users.username"))
Next
Join Public.users ON users.username:
B4X:
Query.Columns("message,created_by,id, users(username)") 'Join Public.users ON users.username
Get the joined column:
B4X:
Row.Get("users.username")
Join the Auth.Users Table:
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
Last edited: