We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
TableDefinition
1 parent 388c255 commit f69749fCopy full SHA for f69749f
Sources/StructuredQueriesCore/TableDefinition.swift
@@ -15,4 +15,15 @@ extension TableDefinition {
15
public var queryFragment: QueryFragment {
16
Self.allColumns.map(\.queryFragment).joined(separator: ", ")
17
}
18
+
19
+ // NB: Without this identity subscript, a more confusing error is produced for missing columns:
20
+ //
21
+ // > Referencing subscript 'subscript(dynamicMember:)' on 'TableDefinition' requires that 'T'
22
+ // > conform to 'TableDraft'
23
+ @_disfavoredOverload
24
+ public subscript<Member>(
25
+ dynamicMember keyPath: KeyPath<Self, Member>
26
+ ) -> Member {
27
+ self[keyPath: keyPath]
28
+ }
29
0 commit comments