Decouple associations from TableRecord

Associations is generic for type safety, not for defining the association (just as QueryInterfaceRequest)
This commit is contained in:
Gwendal Roué committed 2021-01-23 09:48:18 +01:00
1 parent bc5ba1fda5
commit 8bf9e5e30f
9 files changed
+62 -26

No files matched your search

@@ -3,9 +3,7 @@ extension TableRecord {
// MARK: Request Derivation
static var relationForAll: SQLRelation {
SQLRelation(
source: SQLSource(tableName: databaseTableName, alias: nil),
selectionPromise: DatabasePromise(value: databaseSelection))
.all(fromTable: databaseTableName, selection: { _ in databaseSelection })
}
/// Creates a request which fetches all records.