close tabs by host

This commit is contained in:
Fabian Freund committed 2025-06-02 22:22:07 +02:00
1 parent f6e0f665ce
commit 8fccd767af
9 files changed
+91 -16

No files matched your search

@@ -66,6 +66,20 @@ class ContainerDao extends DatabaseAccessor<TabDatabase>
return query.map((row) => row.read(db.tab.id)!);
}
Selectable<TabData> getContainerTabsData(String? containerId) {
final query =
db.tab.select()
..where(
(t) =>
(containerId != null)
? t.containerId.equals(containerId)
: t.containerId.isNull(),
)
..orderBy([(t) => OrderingTerm.asc(t.orderKey)]);
return query;
}
SingleSelectable<String> generateLeadingOrderKey(
String? containerId, {
int bucket = 0,