ClientManagerTransformBuilder<TModel extends TetherModel<TModel> > class
A builder for transforming Supabase queries with pagination, ordering, and limiting capabilities. Also applies transformations to an associated Drift query if present.
- Inheritance
-
- Object
- ClientManagerBase<
TModel> - ClientManagerTransformBuilder
- Implementers
Constructors
-
ClientManagerTransformBuilder.new({required String tableName, required SqliteDatabase localDb, required SupabaseClient client, required PostgrestTransformBuilder supabase, required String localTableName, required Map<
String, SupabaseTableInfo> tableSchemas, required FromJsonFactory<TModel> fromJsonFactory, required FromSqliteFactory<TModel> fromSqliteFactory, SqlOperationType? type = SqlOperationType.select, SelectBuilderBase? selector, required SqlStatement? localQuery, bool maybeSingle = false, bool isRemoteOnly = false, bool isLocalOnly = false, SelectBuilderBase? selectorStatement, required SupabaseQueryBuilder baseSupabase})
Properties
- baseSupabase → SupabaseQueryBuilder
-
finalinherited
- client → SupabaseClient
-
finalinherited
-
fromJsonFactory
→ FromJsonFactory<
TModel> -
finalinherited
-
fromSqliteFactory
→ FromSqliteFactory<
TModel> -
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isLocalOnly ↔ bool
-
getter/setter pairinherited
- isRemoteOnly ↔ bool
-
getter/setter pairinherited
- localDb → SqliteDatabase
-
finalinherited
- localQuery ↔ SqlStatement?
-
getter/setter pairinherited
- localTableName → String
-
finalinherited
- maybeSingle ↔ bool
-
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selector → SelectBuilderBase?
-
finalinherited
- selectorStatement ↔ SelectBuilderBase?
-
getter/setter pairinherited
- supabase → PostgrestTransformBuilder
-
final
- syncWithSupabase → bool
-
finalinherited
- tableName → String
-
finalinherited
-
tableSchemas
→ Map<
String, SupabaseTableInfo> -
finalinherited
- type → SqlOperationType?
-
finalinherited
Methods
-
asStream(
) → Stream< TetherClientReturn< TModel> > -
Stream implementation
inherited
-
catchError(
Function onError, {bool test(Object error)?}) → Future< TetherClientReturn< TModel> > -
Handle errors
inherited
-
limit(
int count) → ClientManagerTransformBuilder< TModel> - Limit the number of results.
-
localOnly(
) → ClientManagerTransformBuilder< TModel> - Set local only mode, which means the query will only fetch data from the local database.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
order(
TetherColumn column, {bool ascending = true, bool nullsFirst = false}) → ClientManagerTransformBuilder< TModel> - Order the results.
-
range(
int from, int to) → ClientManagerTransformBuilder< TModel> - Limit the results to rows within the specified range, inclusive.
-
remoteOnly(
) → ClientManagerTransformBuilder< TModel> - Set remote only mode, which means the query will only fetch data from the remote database.
-
single(
) → ClientManagerTransformBuilder< TModel> - Limit the results to a single item
-
then<
R> (FutureOr< R> onValue(TetherClientReturn<TModel> value), {Function? onError}) → Future<R> -
Main execution point - when the future is awaited
inherited
-
timeout(
Duration timeLimit, {FutureOr< TetherClientReturn< onTimeout()?}) → Future<TModel> >TetherClientReturn< TModel> > -
Timeout implementation
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
upsertSupabaseData(
List< Map< supabaseResponse) → Future<String, dynamic> >void> -
Generates a list of UPSERT SQL statements for nested data from a Supabase response.
Each type of nested data will have its own UPSERT statement.
inherited
-
whenComplete(
FutureOr< void> action()) → Future<TetherClientReturn< TModel> > -
Completion callback
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited