Skip to content

Commit 1ad553e

Browse files
committed
wip
1 parent 4044506 commit 1ad553e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Sources/StructuredQueriesCore/QueryFragment.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@ public struct QueryFragment: Hashable, Sendable {
2525

2626
/// A Boolean value indicating whether the query fragment is empty.
2727
public var isEmpty: Bool {
28-
segments.isEmpty
28+
segments.allSatisfy {
29+
switch $0 {
30+
case .sql(let sql):
31+
sql.isEmpty
32+
case .binding(let binding):
33+
false
34+
}
35+
}
2936
}
3037

3138
/// Appends the given fragment to this query fragment.

0 commit comments

Comments
 (0)