Depended queries support added

This commit is contained in:
Kingkor Roy Tirtho
2022-06-22 17:56:24 +06:00
parent 8c53f1b0fe
commit 73711ee77d
10 changed files with 234 additions and 127 deletions
@@ -1,5 +1,22 @@
import 'package:fl_query/src/query.dart';
/// How to make dependent Queries?
///
/// Pass a [QueryBowl] class/object to [task] that contains a method
/// [QueryBowl.dependOnQuery] that takes a [QueryJob] and uses that to get
/// the appropriate query for it or if it doesn't exist creates a new
/// instance. It listens to the changes of [Query] of the passed
/// [QueryJob] & calls the [notifyListener] method of running [Query]
///
/// If shown briefly
///
/// ```data
/// task: (queryKey, external, queryBowl){
/// final dependentQuery = queryBowl.dependOnQuery(dependentQueryJob);
/// return someAsyncTask();
/// }
/// ```
class QueryJob<T extends Object, Outside> {
// all params
String _queryKey;