Skip to content

Commit df42af1

Browse files
Fixed an issue where the documentation for ManyToManyIndex and ManyToOneIndex was swapped
1 parent a363981 commit df42af1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/CodableDatastore/Datastore/DatastoreFormat.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,14 @@ public protocol DatastoreFormat<Version, Instance, Identifier>: Sendable {
108108
/// This type of index is typically used for most unique identifiers, and may be useful if there is an alternative unique identifier a instance may be referenced under.
109109
typealias OneToOneIndex<Value: Indexable & DiscreteIndexable> = OneToOneIndexRepresentation<Instance, Value>
110110

111-
/// A Many-value to One-instance index.
111+
/// A Many-value to Many-instance index.
112112
///
113-
/// This type of index can be used if several alternative identifiers can reference an instance, and they all reside in a single property.
113+
/// This type of index is common when building relationships between different instances, where one instance may be related to several others in some way.
114114
typealias ManyToManyIndex<S: Sequence<Value>, Value: Indexable> = ManyToManyIndexRepresentation<Instance, S, Value>
115115

116-
/// A Many-value to Many-instance index.
116+
/// A Many-value to One-instance index.
117117
///
118-
/// This type of index is common when building relationships between different instances, where one instance may be related to several others in some way.
118+
/// This type of index can be used if several alternative identifiers can reference an instance, and they all reside in a single property.
119119
typealias ManyToOneIndex<S: Sequence<Value>, Value: Indexable & DiscreteIndexable> = ManyToOneIndexRepresentation<Instance, S, Value>
120120

121121
/// Generate index representations for the datastore.

0 commit comments

Comments
 (0)