Skip to content

Commit 21f9a89

Browse files
authored
Add distinct to PrimaryKeyedTable.TableColumns.count (#133)
1 parent 2468f4e commit 21f9a89

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/StructuredQueriesCore/PrimaryKeyed.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ extension PrimaryKeyedTableDefinition {
7070
/// - Parameter filter: A `FILTER` clause to apply to the aggregation.
7171
/// - Returns: An expression representing the number of rows in this table.
7272
public func count(
73+
distinct isDistinct: Bool = false,
7374
filter: (some QueryExpression<Bool>)? = Bool?.none
7475
) -> some QueryExpression<Int> {
75-
primaryKey.count(filter: filter)
76+
primaryKey.count(distinct: isDistinct, filter: filter)
7677
}
7778
}
7879

0 commit comments

Comments
 (0)