includes method

  1. @override
QueryMethod<T?> includes(
  1. List args
)
override

includes method

Implementation

@override
QueryMethod<T?> includes(List args) {
  _includes
    ..clear()
    ..addAll(args.map((arg) {
      DataAccessObject? value;

      final isDao =
          QuickeyDB.getInstance!.dataAccessObjects!.containsKey(arg);

      if (isDao) {
        value = QuickeyDB.getInstance!.dataAccessObjects![arg];
      } else if (arg is ProxyInclude) {
        value = arg.parent;
        value!.includes(arg.children);
        if (kDebugMode) {
          print(arg);
        }
      }

      return value;
    }));

  return this;
}