getRawList method

Future<List<Map>> getRawList ({bool distinct, List<String> columns, String where, List whereArgs, String groupBy, String having, String orderBy, int limit, int offset })

Implementation

Future<List<Map>> getRawList(
    {bool distinct,
    List<String> columns,
    String where,
    List whereArgs,
    String groupBy,
    String having,
    String orderBy,
    int limit,
    int offset}) async {
  Database db = await this.db;
  try {
    // Extracting fields from schema
    List<String> columns = selectColumns;
    // Querying the database
    List<Map> maps = await db.query(
      this.tableName,
      distinct: distinct,
      columns: columns,
      where: where,
      whereArgs: whereArgs,
      groupBy: groupBy,
      having: having,
      orderBy: orderBy,
      limit: limit,
      offset: offset,
    );
    return maps;
  } catch (e) {
    await this.close();
    throw new Exception(e);
  }
}