You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// **Internal:** Load a range of instances from a datastore based on the identifier range passed in as an async sequence.
503
+
///
502
504
/// - Parameters:
503
505
/// - identifierRange: The range to load.
504
506
/// - order: The order to process instances in.
@@ -538,13 +540,13 @@ extension Datastore {
538
540
539
541
/// Load a range of instances from a datastore based on the identifier range passed in as an async sequence.
540
542
///
541
-
/// The sequence should be consumed a single time, ideally within the same transaction it was created in as it holds a reference to that transaction and thus snapshot of the datastore for data consistency.
543
+
/// - Important: The sequence should be consumed at most a single time, ideally within the same transaction it was created in as it holds a reference to that transaction and thus snapshot of the datastore for data consistency.
542
544
/// - Parameters:
543
545
/// - identifierRange: The range to load.
544
546
/// - order: The order to process instances in.
545
547
/// - Returns: An asynchronous sequence containing the instances matching the range of identifiers.
/// Load a range of instances from a datastore based on the identifier range passed in as an async sequence.
555
557
///
556
-
/// The sequence should be consumed a single time, ideally within the same transaction it was created in as it holds a reference to that transaction and thus snapshot of the datastore for data consistency.
558
+
/// - Important: The sequence should be consumed at most a single time, ideally within the same transaction it was created in as it holds a reference to that transaction and thus snapshot of the datastore for data consistency.
557
559
/// - Parameters:
558
560
/// - identifierRange: The range to load.
559
561
/// - order: The order to process instances in.
560
562
/// - Returns: An asynchronous sequence containing the instances matching the range of identifiers.
/// Load all instances in a datastore as an async sequence.
570
573
///
571
-
/// The sequence should be consumed a single time, ideally within the same transaction it was created in as it holds a reference to that transaction and thus snapshot of the datastore for data consistency.
574
+
/// - Important: The sequence should be consumed at most a single time, ideally within the same transaction it was created in as it holds a reference to that transaction and thus snapshot of the datastore for data consistency.
572
575
/// - Parameters:
573
576
/// - unboundedRange: The range to load. Specify `...` to load every instance.
574
577
/// - order: The order to process instances in.
575
578
/// - Returns: An asynchronous sequence containing all the instances.
/// This is conceptually similar to loading all instances and filtering only those who's indexed key path matches the specified value, but is much more efficient as an index is already maintained for that value.
650
653
///
651
-
/// The sequence should be consumed a single time, ideally within the same transaction it was created in as it holds a reference to that transaction and thus snapshot of the datastore for data consistency.
654
+
/// - Important: The sequence should be consumed at most a single time, ideally within the same transaction it was created in as it holds a reference to that transaction and thus snapshot of the datastore for data consistency.
652
655
/// - Parameters:
653
-
/// - value: The value to match against.
654
-
/// - order: The order to process instances in.
655
656
/// - index: The index to load from.
657
+
/// - value: The value to match against.
658
+
/// - order: The order to process instances in.
656
659
/// - Returns: An asynchronous sequence containing the instances matching the specified indexed value.
/// Load an instance with the matching indexed value, or return nil if one is not found.
671
+
/// Load an instance with the matching indexed value, or return `nil` if one is not found.
669
672
///
670
673
/// This requires either a ``DatastoreFormat/OneToOneIndex`` or ``DatastoreFormat/ManyToOneIndex`` to be declared as the index, and a guarantee on the caller's part that at most only a single instance will match the specified value. If multiple instancess match, the one with the identifier that sorts first will be returned.
671
674
/// - Parameters:
672
-
/// - value: The value to match against.
673
675
/// - index: The index to load from.
674
-
/// - Returns: The instance keyed to the specified indexed value, or nil if none are found.
676
+
/// - value: The value to match against.
677
+
/// - Returns: The instance keyed to the specified indexed value, or `nil` if none are found.
/// This is conceptually similar to loading all instances and filtering only those who's indexed key path matches the specified range, but is much more efficient as an index is already maintained for that range of values.
688
691
///
689
-
/// The sequence should be consumed a single time, ideally within the same transaction it was created in as it holds a reference to that transaction and thus snapshot of the datastore for data consistency.
692
+
/// - Important: The sequence should be consumed at most a single time, ideally within the same transaction it was created in as it holds a reference to that transaction and thus snapshot of the datastore for data consistency.
690
693
/// - Parameters:
694
+
/// - index: The index to load from.
691
695
/// - range: The range to load.
692
696
/// - order: The order to process instances in.
693
-
/// - index: The index to load from.
694
697
/// - Returns: An asynchronous sequence containing the instances matching the range of values in that sequence.
/// This is conceptually similar to loading all instances and filtering only those who's indexed key path matches the specified range, but is much more efficient as an index is already maintained for that range of values.
709
712
///
710
-
/// The sequence should be consumed a single time, ideally within the same transaction it was created in as it holds a reference to that transaction and thus snapshot of the datastore for data consistency.
713
+
/// - Important: The sequence should be consumed at most a single time, ideally within the same transaction it was created in as it holds a reference to that transaction and thus snapshot of the datastore for data consistency.
711
714
/// - Parameters:
715
+
/// - index: The index to load from.
712
716
/// - range: The range to load.
713
717
/// - order: The order to process instances in.
714
-
/// - index: The index to load from.
715
718
/// - Returns: An asynchronous sequence containing the instances matching the range of values in that sequence.
/// Load all instances in a datastore in index order as an async sequence.
729
732
///
730
-
/// The sequence should be consumed a single time, ideally within the same transaction it was created in as it holds a reference to that transaction and thus snapshot of the datastore for data consistency.
733
+
/// - Important: The sequence should be consumed at most a single time, ideally within the same transaction it was created in as it holds a reference to that transaction and thus snapshot of the datastore for data consistency.
731
734
///
732
-
/// - Note: If the index is a Mant-to-Any type of index, a smaller or larger number of results may be returned here, as some instances may not be respresented in the index, while others are other-represented and may show up multiple times.
735
+
/// - Note: If the index is a Many-to-Any type of index, a smaller or larger number of results may be returned here, as some instances may not be respresented in the index, while others are over-represented and may show up multiple times.
733
736
/// - Parameters:
737
+
/// - index: The index to load from.
734
738
/// - unboundedRange: The range to load. Specify `...` to load every instance.
735
739
/// - order: The order to process instances in.
736
-
/// - index: The index to load from.
737
740
/// - Returns: An asynchronous sequence containing all the instances, ordered by the specified index.
0 commit comments