simpleQueryData method
Future<List>
simpleQueryData(
- String collectionId, {
- required String name,
- required String value,
- required String orderBy,
- bool descending = true,
- int? limit,
- int? offset,
override
Implementation
@override
Future<List> simpleQueryData(String collectionId,
{required String name,
required String value,
required String orderBy,
bool descending = true,
int? limit,
int? offset}) async {
await initialize();
SupabaseQueryBuilder fromRef = AbsDatabase.sbDBConn!.from(collectionId);
if (limit != null) {
if (offset != null) {
return await fromRef
.select()
.eq(name, value)
.order(orderBy, ascending: !descending)
.limit(limit)
.range(offset, offset + limit);
}
return await fromRef
.select()
.eq(name, value)
.order(orderBy, ascending: !descending)
.limit(limit);
}
return await fromRef.select().eq(name, value).order(orderBy, ascending: !descending);
}