Merge branch 'main' into migrate_from_sqflite
This commit is contained in:
commit
23801f8fa6
1 changed files with 6 additions and 5 deletions
|
@ -736,7 +736,7 @@ class FilesDB {
|
|||
if (durations.isEmpty) {
|
||||
return <EnteFile>[];
|
||||
}
|
||||
final db = await instance.database;
|
||||
final db = await instance.sqliteAsyncDB;
|
||||
String whereClause = "( ";
|
||||
for (int index = 0; index < durations.length; index++) {
|
||||
whereClause += "($columnCreationTime >= " +
|
||||
|
@ -751,11 +751,12 @@ class FilesDB {
|
|||
}
|
||||
}
|
||||
whereClause += ")";
|
||||
final results = await db.query(
|
||||
filesTable,
|
||||
where: whereClause,
|
||||
orderBy: '$columnCreationTime ' + order,
|
||||
final query =
|
||||
'SELECT * FROM $filesTable WHERE $whereClause ORDER BY $columnCreationTime $order';
|
||||
final results = await db.getAll(
|
||||
query,
|
||||
);
|
||||
|
||||
final files = convertToFiles(results);
|
||||
return applyDBFilters(
|
||||
files,
|
||||
|
|
Loading…
Add table
Reference in a new issue