sqlRunRead static method
Implementation
static Future<List<Map<String, dynamic>>> sqlRunRead({
required sql.Database db,
required String tableName,
String? where,
String? orderBy,
int? limit,
int? offset,
}) async {
try {
var data = await db.query(
tableName,
where: where,
orderBy: orderBy,
offset: offset,
limit: limit,
);
if (data.isEmpty) return [];
return data;
} catch (e) {
return [];
}
}