joinQuery method

Future<List<Map<String, dynamic>>> joinQuery(
  1. String table1,
  2. String table2,
  3. String joinCondition, {
  4. String? where,
  5. List? whereArgs,
})

Implementation

Future<List<Map<String, dynamic>>> joinQuery(String table1, String table2,
    String joinCondition, {String? where, List<dynamic>? whereArgs}) async {
  final sql =
      'SELECT * FROM $table1 INNER JOIN $table2 ON $joinCondition ${where != null ? 'WHERE $where' : ''}';
  return await _database.rawQuery(sql, whereArgs);
}