Click or drag to resize

LiteEngineUpsert Method

Implement upsert command to documents in a collection. Calls update on all documents, then any documents not updated are then attempted to insert. This will have the side effect of throwing if duplicate items are attempted to be inserted.

Namespace: Internal.LiteDB.Engine
Assembly: NeoAxis.Core (in NeoAxis.Core.dll) Version: 2026.1.1.0 (2026.1.1.0)
Syntax
C#
public int Upsert(
	string collection,
	IEnumerable<BsonDocument> docs,
	BsonAutoId autoId
)

Parameters

collection  String
 
docs  IEnumerableBsonDocument
 
autoId  BsonAutoId
 

Return Value

Int32

Implements

ILiteEngineUpsert(String, IEnumerableBsonDocument, BsonAutoId)
See Also