query method
Future<List<Map<String, Object?>>?>
query(
- String tableName, {
- bool? distinct,
- List<String>? columns,
- String? where,
- List<Object?>? whereArgs,
- String? groupBy,
- String? having,
- String? orderBy,
- int? limit,
- int? offset,
})
Implementation
Future<List<Map<String, Object?>>?> query(String tableName,
{bool? distinct,
List<String>? columns,
String? where,
List<Object?>? whereArgs,
String? groupBy,
String? having,
String? orderBy,
int? limit,
int? offset}) async {
await _initialize();
bool isTableExists = await _isTableExists(tableName);
if (!isTableExists) {
return Future(() => null);
}
return await _database?.query(tableName,
distinct: distinct,
columns: columns,
where: where,
whereArgs: whereArgs,
groupBy: groupBy,
having: having,
orderBy: orderBy,
limit: limit,
offset: offset);
}