Struct CRUDResult
Returned by CRUD operations from the server, contains information about total docs affected and write errors. The caller needs to inspect the TotalDocumentsAffected and WriteErrors to handle error conditions
Inherited Members
Namespace: Azos.Data.Access.MongoDb.Connector
Assembly: Azos.MongoDb.dll
Syntax
[Serializable]
public struct CRUDResult
Fields
TotalDocumentsAffected
This field contains the aggregated number of documents successfully matched (n) by the entire write command. This includes the number of documents inserted, upserted, updated, and deleted. We do not report on the individual number of documents affected by each batch item. If the application would wish so, then the application should issue one-item batches.
Declaration
public readonly int TotalDocumentsAffected
Field Value
Type | Description |
---|---|
System.Int32 |
TotalDocumentsUpdatedAffected
Optional field, with a positive numeric type or zero. Zero is the default value. This field is only and always present for batch updates. nModified is the physical number of documents affected by an update, while TotalDocumentsMatched is the logical number of documents matched by the update's query.
Declaration
public readonly int TotalDocumentsUpdatedAffected
Field Value
Type | Description |
---|---|
System.Int32 |
Upserted
NULL or for every batch document that was upserted
Declaration
public readonly CRUDUpsertInfo[] Upserted
Field Value
Type | Description |
---|---|
CRUDUpsertInfo[] |
WriteErrors
NULL or For every batch write that had an error, there is one entry in the array describing the error
Declaration
public readonly CRUDWriteError[] WriteErrors
Field Value
Type | Description |
---|---|
CRUDWriteError[] |