SupabaseProvider class

Retrieves from a Supabase server

Constructors

SupabaseProvider.new(SupabaseClient client, {required SupabaseModelDictionary modelDictionary})
Retrieves from a Supabase server

Properties

client → SupabaseClient
The client used to connect to the Supabase server. For some cases, like offline repositories, the offl
final
hashCode int
The hash code for this object.
no setterinherited
logger → Logger
final
modelDictionary SupabaseModelDictionary
The glue between app models and generated adapters.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

delete<TModel extends SupabaseModel>(TModel instance, {Query? query, ModelRepository<SupabaseModel>? repository}) Future<bool>
Sends a DELETE request method to the endpoint
exists<TModel extends SupabaseModel>({Query? query, ModelRepository<SupabaseModel>? repository}) Future<bool>
Whether a model instance is present. null is returned when existence is unknown. The model instance is not hydrated in the function output; a bool variant (e.g. List<bool>, Map<TModel, bool>) should be returned.
get<TModel extends SupabaseModel>({Query? query, ModelRepository<SupabaseModel>? repository}) Future<List<TModel>>
Query for raw data and construct it with an Adapter
insert<TModel extends SupabaseModel>(TModel instance, {Query? query, ModelRepository<SupabaseModel>? repository}) Future<TModel>
In almost all cases, use upsert. This method is provided for cases when a table's policy permits inserts without updates.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
recursiveAssociationUpsert(Map<String, dynamic> serializedInstance, {UpsertMethod method = UpsertMethod.upsert, required Type type, Query? query, ModelRepository<SupabaseModel>? repository}) Future<SupabaseModel>
Discover all SupabaseModel-like associations of a serialized instance and upsert them recursively before the requested instance is upserted.
toString() String
A string representation of this object.
inherited
update<TModel extends SupabaseModel>(TModel instance, {Query? query, ModelRepository<SupabaseModel>? repository}) Future<TModel>
In almost all cases, use upsert. This method is provided for cases when a table's policy permits updates without inserts.
upsert<TModel extends SupabaseModel>(TModel instance, {Query? query, ModelRepository<SupabaseModel>? repository}) Future<TModel>
Association models are upserted recursively before the requested instance is upserted. Because it's unknown if there has been any change from the local association to the remote association, all associations and their associations are upserted on a parent's upsert.
upsertByType(Map<String, dynamic> serializedInstance, {UpsertMethod method = UpsertMethod.upsert, required Type type, Query? query, ModelRepository<SupabaseModel>? repository}) Future<SupabaseModel>
Used by recursiveAssociationUpsert, this performs the upsert to Supabase and selects the model's fields in the response.

Operators

operator ==(Object other) bool
The equality operator.
inherited