File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed
Sources/_StructuredQueriesSQLite
Tests/StructuredQueriesTests Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,9 @@ private final class AggregateDatabaseFunctionIterator<
126126> : AggregateDatabaseFunctionIteratorProtocol {
127127 let body : Body
128128 let stream = Stream < Body . Row > ( )
129- let queue = DispatchQueue . global ( qos: . userInitiated)
129+ let queue = DispatchQueue (
130+ label: " co.pointfree.StructuredQueriesSQLite.AggregateDatabaseFunction "
131+ )
130132 var _result : QueryBinding ?
131133 init ( _ body: Body ) {
132134 self . body = body
Original file line number Diff line number Diff line change @@ -554,5 +554,29 @@ extension SnapshotTests {
554554 """
555555 }
556556 }
557+
558+ @DatabaseFunction
559+ func tagged( _ tags: some Sequence< Tag > ) -> String {
560+ tags. map { " # \( $0. title) " } . joined ( separator: " " )
561+ }
562+
563+ @Test func selectionTableAggregate( ) {
564+ $tagged. install ( database. handle)
565+
566+ assertQuery (
567+ Tag . select { $tagged ( $0) }
568+ ) {
569+ """
570+ SELECT " tagged " ( " tags " . " id " , " tags " . " title " )
571+ FROM " tags "
572+ """
573+ } results: {
574+ """
575+ ┌─────────────────────────────────┐
576+ │ " #car #kids #someday #optional " │
577+ └─────────────────────────────────┘
578+ """
579+ }
580+ }
557581 }
558582}
You can’t perform that action at this time.
0 commit comments