select method
Implementation
@override
Future<DbResult> select(
String table, {
Map<String, dynamic>? where,
int? limit,
int? offset,
}) async {
var query = 'SELECT * FROM $table';
final values = <String, dynamic>{};
if (where != null && where.isNotEmpty) {
final conditions = where.entries
.map((e) => '${e.key} = @${e.key}')
.join(' AND ');
query += ' WHERE $conditions';
values.addAll(where);
}
if (limit != null) query += ' LIMIT $limit';
if (offset != null) query += ' OFFSET $offset';
return rawQuery(query, values: values);
}