Class Supabase
java.lang.Object
com.codename1.cloud.supabase.Supabase
A Supabase client in pure Java over the project's REST endpoints: PostgREST queries, GoTrue auth, Storage and Realtime.
Requests carry the anon key and, once a user signs in, the user's access token, so your row level security policies apply. An expired session is refreshed before a request, and a 401 refreshes it once and retries.
Supabase supabase = new Supabase("https://xyzcompany.supabase.co", "public-anon-key");
supabase.from("countries").select("id,name").eq("continent", "Europe").order("name", true).limit(10)
.execute().ready(new SuccessCallback<List<Map<String, Object>>>() {
public void onSucess(List<Map<String, Object>> rows) {
Log.p("Got " + rows.size() + " countries");
}
});
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauth()The GoTrue auth client.Starts a PostgREST query or write on a table or view.getKey()The anon key.getUrl()The project URL without a trailing slash.realtime()The Realtime client.voidsetTransport(CloudHttpTransport transport) Replaces the HTTP transport, for tests or a custom stack.storage()The Storage client.
-
Constructor Details
-
Supabase
-
-
Method Details
-
getUrl
The project URL without a trailing slash.
Returns
the URL
-
getKey
The anon key.
Returns
the key
-
setTransport
Replaces the HTTP transport, for tests or a custom stack.
Parameters
transport: the transport
-
auth
The GoTrue auth client.
Returns
the auth client
-
from
Starts a PostgREST query or write on a table or view.
Parameters
table: the table name
Returns
a new query builder
-
storage
The Storage client.
Returns
the storage client
-
realtime
The Realtime client.
Returns
the realtime client
-