Skip to content

Commit 61feb93

Browse files
committed
wip
1 parent 4e4732c commit 61feb93

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

Sources/StructuredQueriesCore/Optional.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ extension Optional: Table where Wrapped: Table {
8080
}
8181

8282
fileprivate subscript<Member: QueryRepresentable>(
83-
member _: KeyPath<Member, Member> & Sendable,
84-
column keyPath: KeyPath<Wrapped, Member.QueryOutput> & Sendable
83+
member _: KeyPath<Member, Member>,
84+
column keyPath: KeyPath<Wrapped, Member.QueryOutput>
8585
) -> Member.QueryOutput? {
8686
self?[keyPath: keyPath]
8787
}

Sources/StructuredQueriesCore/Statements/Select.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ public struct _SelectClauses: Sendable {
321321
#if compiler(>=6.1)
322322
@dynamicMemberLookup
323323
#endif
324-
public struct Select<Columns, From: Table, Joins> {
324+
public struct Select<Columns, From: Table, Joins>: Sendable {
325325
// NB: A parameter pack compiler crash forces us to heap-allocate this storage.
326326
@CopyOnWrite var clauses = _SelectClauses()
327327

Sources/StructuredQueriesCore/TableAlias.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ public struct TableAlias<
106106
let base: Base
107107

108108
subscript<Member: QueryRepresentable>(
109-
member _: KeyPath<Member, Member> & Sendable,
110-
column keyPath: KeyPath<Base, Member.QueryOutput> & Sendable
109+
member _: KeyPath<Member, Member>,
110+
column keyPath: KeyPath<Base, Member.QueryOutput>
111111
) -> Member.QueryOutput {
112112
base[keyPath: keyPath]
113113
}

Sources/StructuredQueriesCore/TableColumn.swift

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,23 @@ public protocol TableColumnExpression<Root, Value>: QueryExpression where Value
2525
/// Don't create instances of this value directly. Instead, use the `@Table` and `@Column` macros to
2626
/// generate values of this type.
2727
public struct TableColumn<Root: Table, Value: QueryRepresentable & QueryBindable>:
28-
TableColumnExpression,
29-
Sendable
30-
where Value.QueryOutput: Sendable {
28+
TableColumnExpression
29+
{
3130
public typealias QueryValue = Value
3231

3332
public let name: String
3433

3534
public let defaultValue: Value.QueryOutput?
3635

37-
let _keyPath: KeyPath<Root, Value.QueryOutput> & Sendable
36+
let _keyPath: KeyPath<Root, Value.QueryOutput>
3837

3938
public var keyPath: KeyPath<Root, Value.QueryOutput> {
4039
_keyPath
4140
}
4241

4342
public init(
4443
_ name: String,
45-
keyPath: KeyPath<Root, Value.QueryOutput> & Sendable,
44+
keyPath: KeyPath<Root, Value.QueryOutput>,
4645
default defaultValue: Value.QueryOutput? = nil
4746
) {
4847
self.name = name
@@ -52,7 +51,7 @@ where Value.QueryOutput: Sendable {
5251

5352
public init(
5453
_ name: String,
55-
keyPath: KeyPath<Root, Value.QueryOutput> & Sendable,
54+
keyPath: KeyPath<Root, Value.QueryOutput>,
5655
default defaultValue: Value? = nil
5756
) where Value == Value.QueryOutput {
5857
self.name = name

Sources/StructuredQueriesMacros/TableMacro.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ extension TableMacro: ExtensionMacro {
549549
\(declaration.attributes.availability)extension \(type)\
550550
\(conformances.isEmpty ? "" : ": \(conformances, separator: ", ")") {\
551551
\(typeAliases, separator: "\n")
552-
public static let columns = TableColumns()
552+
public static var columns: TableColumns { TableColumns() }
553553
public static let tableName = \(tableName)\(letSchemaName)\(initDecoder)\(initFromOther)
554554
}
555555
"""

0 commit comments

Comments
 (0)