Class OperationResult
The result of an operation.
Inherited Members
Namespace: Couchbase.Core.IO.Operations
Assembly: Couchbase.NetClient.dll
Syntax
[Obsolete("This class is not required and will be removed in a future release.")]
public class OperationResult : IOperationResult, IResult
Remarks
If Success is false, use the Message property to help determine the reason.
Properties
| Edit this page View SourceCas
The 'Check and Set' or 'CAS' value for enforcing optimistic concurrency.
Declaration
public ulong Cas { get; set; }
Property Value
Type | Description |
---|---|
ulong |
Durability
The level of durability that the operation achieved
Declaration
public Durability Durability { get; set; }
Property Value
Type | Description |
---|---|
Durability |
Exception
If Success is false and an exception has been caught internally, this field will contain the exception.
Declaration
public Exception? Exception { get; set; }
Property Value
Type | Description |
---|---|
Exception |
Id
Gets the id or key for the document.
Declaration
public string? Id { get; }
Property Value
Type | Description |
---|---|
string | The identifier. |
Message
If Success is false, the reason why the operation failed.
Declaration
public string? Message { get; }
Property Value
Type | Description |
---|---|
string |
OpCode
Gets the OpCode for the operation.
Declaration
public OpCode OpCode { get; }
Property Value
Type | Description |
---|---|
OpCode | The op code. |
Status
The status returned from the Couchbase Server after an operation.
Declaration
public ResponseStatus Status { get; }
Property Value
Type | Description |
---|---|
ResponseStatus |
Remarks
Success will be returned if Success is true, otherwise Success will be false. If ClientFailure is returned, then the operation failed before being sent to the Couchbase Server.
Success
True if the operation succeeded.
Declaration
public bool Success { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
If Success is false, use the Message property to help determine the reason.
Token
Gets the mutation token for the operation if enhanced durability is enabled.
Declaration
public MutationToken? Token { get; }
Property Value
Type | Description |
---|---|
MutationToken | The mutation token. |
Methods
| Edit this page View SourceIsNmv()
Checks if the server responded with a Not My Vbucket.
Declaration
public bool IsNmv()
Returns
Type | Description |
---|---|
bool | Returns true if ResponseStatus is a VBucketBelongsToAnotherServer. |
ShouldRetry()
If the response indicates the request is retryable, returns true.
Declaration
public bool ShouldRetry()
Returns
Type | Description |
---|---|
bool |
Remarks
Intended for internal use only.
ToString()
Returns a string that represents this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents this instance. |