Closed JohnCoates closed 1 year ago
Hey, thanks for highlighting this! MongoKitten 7 has a couple of helpers already, but I don't think I'll add overrides for each and every possible scenario. However, I propose adding an override on SortedIndex
that accepts multiple fields, which you can then mark as unique using the .unique()
function on that index.
That sounds like a good solution.
fixed in 7.2.14
Is your feature request related to a problem? Please describe.
Is it currently possible to build a unique index with multiple fields? I looked at the following code but it didn't look like I could do that. https://github.com/orlandos-nl/MongoKitten/blob/c82d7be854ce9a16d0eb3d0f6fd30b4b8c55e9aa/Sources/Meow/Indexes.swift#L27-L33
Describe the solution you'd like Would be great to add a unique index with multiple fields.
Describe alternatives you've considered None.
Additional context N/A