mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-03-25 00:14:42 +01:00
Make code more readable
This commit is contained in:
parent
05f7ecf55f
commit
3229c014bf
1 changed files with 11 additions and 8 deletions
|
@ -51,8 +51,11 @@ class ByAccount {
|
||||||
}
|
}
|
||||||
|
|
||||||
class AccountFileRowIds {
|
class AccountFileRowIds {
|
||||||
const AccountFileRowIds(
|
const AccountFileRowIds({
|
||||||
this.accountFileRowId, this.accountRowId, this.fileRowId);
|
required this.accountFileRowId,
|
||||||
|
required this.accountRowId,
|
||||||
|
required this.fileRowId,
|
||||||
|
});
|
||||||
|
|
||||||
final int accountFileRowId;
|
final int accountFileRowId;
|
||||||
final int accountRowId;
|
final int accountRowId;
|
||||||
|
@ -173,9 +176,9 @@ extension SqliteDbExtension on SqliteDb {
|
||||||
});
|
});
|
||||||
return query
|
return query
|
||||||
.map((r) => AccountFileRowIds(
|
.map((r) => AccountFileRowIds(
|
||||||
r.read(accountFiles.rowId)!,
|
accountFileRowId: r.read(accountFiles.rowId)!,
|
||||||
r.read(accountFiles.account)!,
|
accountRowId: r.read(accountFiles.account)!,
|
||||||
r.read(accountFiles.file)!,
|
fileRowId: r.read(accountFiles.file)!,
|
||||||
))
|
))
|
||||||
.getSingleOrNull();
|
.getSingleOrNull();
|
||||||
}
|
}
|
||||||
|
@ -206,9 +209,9 @@ extension SqliteDbExtension on SqliteDb {
|
||||||
.map((r) => MapEntry(
|
.map((r) => MapEntry(
|
||||||
r.read(files.fileId)!,
|
r.read(files.fileId)!,
|
||||||
AccountFileRowIds(
|
AccountFileRowIds(
|
||||||
r.read(accountFiles.rowId)!,
|
accountFileRowId: r.read(accountFiles.rowId)!,
|
||||||
r.read(accountFiles.account)!,
|
accountRowId: r.read(accountFiles.account)!,
|
||||||
r.read(accountFiles.file)!,
|
fileRowId: r.read(accountFiles.file)!,
|
||||||
),
|
),
|
||||||
))
|
))
|
||||||
.get()
|
.get()
|
||||||
|
|
Loading…
Add table
Reference in a new issue