@@ -160,7 +160,7 @@ extension DatabaseCollection
160160extension DatabaseCollection
161161{
162162 func insert(
163- _ elements: some Collection < some BSONDocumentEncodable & Identifiable < ElementID > > ,
163+ some elements: some Collection < some BSONDocumentEncodable & Identifiable < ElementID > > ,
164164 with session: Mongo . Session ) async throws
165165 {
166166 if elements. isEmpty
@@ -181,7 +181,8 @@ extension DatabaseCollection
181181}
182182extension DatabaseCollection
183183{
184- func insert( _ element: some BSONDocumentEncodable & Identifiable < ElementID > ,
184+ func insert(
185+ some element: some BSONDocumentEncodable & Identifiable < ElementID > ,
185186 with session: Mongo . Session ) async throws
186187 {
187188 let response : Mongo . InsertResponse = try await session. run (
@@ -196,7 +197,8 @@ extension DatabaseCollection
196197
197198extension DatabaseCollection
198199{
199- func upsert( _ elements: some Sequence < some BSONDocumentEncodable & Identifiable < ElementID > > ,
200+ func upsert(
201+ some elements: some Sequence < some BSONDocumentEncodable & Identifiable < ElementID > > ,
200202 with session: Mongo . Session ) async throws -> Mongo . Updates < ElementID >
201203 {
202204 let response : Mongo . UpdateResponse < ElementID > = try await session. run (
@@ -208,7 +210,8 @@ extension DatabaseCollection
208210 }
209211
210212 @discardableResult
211- func upsert( _ element: some BSONDocumentEncodable & Identifiable < ElementID > ,
213+ func upsert(
214+ some element: some BSONDocumentEncodable & Identifiable < ElementID > ,
212215 with session: Mongo . Session ) async throws -> ElementID ?
213216 {
214217 let response : Mongo . UpdateResponse < ElementID > = try await session. run (
@@ -221,22 +224,6 @@ extension DatabaseCollection
221224 }
222225}
223226
224- extension DatabaseCollection
225- {
226- @available ( * , deprecated, renamed: " update(some:with:) " )
227- func update( _ elements: some Sequence < some BSONDocumentEncodable & Identifiable < ElementID > > ,
228- with session: Mongo . Session ) async throws -> Mongo . Updates < ElementID >
229- {
230- try await self . update ( some: elements, with: session)
231- }
232- @available ( * , deprecated, renamed: " update(some:with:) " )
233- @discardableResult
234- func update( _ element: some BSONDocumentEncodable & Identifiable < ElementID > ,
235- with session: Mongo . Session ) async throws -> Bool ?
236- {
237- try await self . update ( some: element, with: session)
238- }
239- }
240227extension DatabaseCollection
241228{
242229 func update(
@@ -254,7 +241,8 @@ extension DatabaseCollection
254241 /// the passed document. Returns true if the document was modified, false if the document
255242 /// was not modified, and nil if the document was not found.
256243 @discardableResult
257- func update( some element: some BSONDocumentEncodable & Identifiable < ElementID > ,
244+ func update(
245+ some element: some BSONDocumentEncodable & Identifiable < ElementID > ,
258246 with session: Mongo . Session ) async throws -> Bool ?
259247 {
260248 let response : Mongo . UpdateResponse < ElementID > = try await session. run (
0 commit comments