Add function to fetch files created within a specific duration
This commit is contained in:
parent
cbb0a88a07
commit
3925388a4c
1 changed files with 12 additions and 0 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Reference in a new issue