RpcManager<TModel extends TetherModel<TModel> > class
Manages Supabase RPC calls where the response is expected to conform to the structure of a specific database table and should be stored locally.
The RPC function's JSON reply must be an array of objects, where each object
represents a row with fields corresponding to the targetSupabaseTableName
's columns.
Constructors
-
RpcManager.new({required SupabaseClient supabaseClient, required SqliteDatabase localDb, required String targetSupabaseTableName, required String targetLocalTableName, required FromJsonFactory<
TModel> fromJsonFactory, required Map<String, SupabaseTableInfo> tableSchemas})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
String rpcName, {Map< String, dynamic> ? params, bool storeResult = true, bool maybeSingle = false}) → Future - Call an RPC function. rpcName: the PostgREST function name to invoke. params: function params. storeResult: when true, deserializes and upserts into _targetLocalTableName. maybeSingle: when true, expects a single JSON object instead of a list.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited