Skip to content

Commit afd8d49

Browse files
committed
Expose sort and fetch descriptors as public for interoperability with other frameworks.
1 parent 79bd4f2 commit afd8d49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/SwiftQuery/Query.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ public struct Query<T: PersistentModel> {
3939
public var range: Range<Int>?
4040

4141
/// SwiftData compatible sort descriptors generated from the query's sort configuration.
42-
package var sortDescriptors: [SortDescriptor<T>] {
42+
public var sortDescriptors: [SortDescriptor<T>] {
4343
sortBy.map { $0.sortDescriptor }
4444
}
4545

46-
package var fetchDescriptor: FetchDescriptor<T> {
46+
public var fetchDescriptor: FetchDescriptor<T> {
4747
var descriptor = FetchDescriptor(predicate: predicate, sortBy: sortDescriptors)
4848
if let range {
4949
descriptor.fetchOffset = range.lowerBound

0 commit comments

Comments
 (0)