Add function to fetch files created within a specific duration

This commit is contained in:
Vishnu Mohandas 2020-07-20 17:23:42 +05:30
parent cbb0a88a07
commit 3925388a4c

View file

@ -127,6 +127,18 @@ class FilesDB {
return _convertToFiles(results);
}
Future<List<File>> getFilesCreatedWithinDuration(
int startCreationTime, int endCreationTime) async {
final db = await instance.database;
final results = await db.query(
table,
where: '$columnCreationTime >= ? AND $columnCreationTime <= ?',
whereArgs: [startCreationTime, endCreationTime],
orderBy: '$columnCreationTime DESC',
);
return _convertToFiles(results);
}
Future<List<File>> getAllDeleted() async {
final db = await instance.database;
final results = await db.query(