Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions Sources/StructuredQueriesCore/Statement.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// A type that represents a full SQL query.
public protocol Statement<QueryValue>: QueryExpression, Hashable {
public protocol Statement<QueryValue>: QueryExpression {
/// A type representing the table being queried.
associatedtype From: Table

Expand All @@ -15,13 +15,3 @@ extension Statement {
"(\(.newline)\(query.indented())\(.newline))"
}
}

extension Statement {
public static func == (lhs: Self, rhs: Self) -> Bool {
lhs.query == rhs.query
}

public func hash(into hasher: inout Hasher) {
hasher.combine(query)
}
}
6 changes: 5 additions & 1 deletion Tests/StructuredQueriesTests/EphemeralTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@ extension SnapshotTests {
"""
}
}

@Test func equality() {
#expect(TestTable(displayName: "Blob Jr") != TestTable(displayName: "Blob Sr"))
}
}
}

@Table private struct TestTable {
@Table private struct TestTable: Equatable {
var firstName = ""
var lastName = ""
@Ephemeral
Expand Down