rawQuery method

  1. @override
  2. @protected
Future<List<Map<String, Object?>>> rawQuery(
  1. Filter where(
    1. TMeta t
    )?,
  2. String query, {
  3. bool? useIsolate,
  4. Map<String, dynamic>? isolateArgs,
  5. void onIsolatePreMap(
    1. Map<String, dynamic>? isolateArgs
    )?,
})
inherited

Implementation

@override
@protected
Future<List<Map<String, Object?>>> rawQuery(
  Filter Function(TMeta t)? where,
  String query, {
  final bool? useIsolate,
  Map<String, dynamic>? isolateArgs,
  void Function(Map<String, dynamic>? isolateArgs)? onIsolatePreMap,
}) async {
  final db = await dbContext.database;
  if (where == null) {
    return await db.rawQuery(query);
  } else {
    final formattedQuery = await whereString(where, useIsolate);
    return await db.rawQuery(
        '$query WHERE ${formattedQuery.filter}', formattedQuery.whereArgs);
  }
}