Class LookupInBuilder<TDocument>
An implementation of ILookupInBuilder<TDocument> that exposes a "builder" API for constructing a chain of read commands on a document within Couchbase.
Implements
Inherited Members
Namespace: Couchbase.Core.IO.Operations.SubDocument
Assembly: Couchbase.NetClient.dll
Syntax
[Obsolete("This class is not required and will be removed in a future release.")]
public class LookupInBuilder<TDocument> : ILookupInBuilder<TDocument>, ISubDocBuilder<TDocument>, ITypeSerializerProvider, IEnumerable<OperationSpec>, IEnumerable, IEquatable<LookupInBuilder<TDocument>>
Type Parameters
Name | Description |
---|---|
TDocument | The type of the document. |
Properties
| Edit this page View SourceCount
Returns a count of the currently chained operations.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
int | A int representing the number of chained commands. |
Key
Gets or sets the unique identifier for the document.
Declaration
public string Key { get; }
Property Value
Type | Description |
---|---|
string | The key. |
Serializer
Gets the ITypeSerializer related to the object.
Declaration
public ITypeSerializer Serializer { get; }
Property Value
Type | Description |
---|---|
ITypeSerializer |
Timeout
The maximum time allowed for an operation to live before timing out.
Declaration
public TimeSpan? Timeout { get; }
Property Value
Type | Description |
---|---|
TimeSpan? |
Methods
| Edit this page View SourceEquals(LookupInBuilder<TDocument>)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(LookupInBuilder<TDocument> other)
Parameters
Type | Name | Description |
---|---|---|
LookupInBuilder<TDocument> | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
Execute()
Executes the chained operations.
Declaration
public IDocumentFragment<TDocument> Execute()
Returns
Type | Description |
---|---|
IDocumentFragment<TDocument> | A Couchbase.IDocumentFragment`1 representing the results of the chained operations. |
ExecuteAsync()
Executes the chained operations.
Declaration
public Task<IDocumentFragment<TDocument>> ExecuteAsync()
Returns
Type | Description |
---|---|
Task<IDocumentFragment<TDocument>> | A Couchbase.IDocumentFragment`1 representing the results of the chained operations. |
Exists(string)
Checks for the existence of a given N1QL path.
Declaration
public ILookupInBuilder<TDocument> Exists(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path. |
Returns
Type | Description |
---|---|
ILookupInBuilder<TDocument> | A Couchbase.Core.ILookupInBuilder`1 implementation reference for chaining operations. |
Exists(string, SubdocPathFlags, SubdocDocFlags)
Checks for the existence of a given N1QL path.
Declaration
public ILookupInBuilder<TDocument> Exists(string path, SubdocPathFlags pathFlags, SubdocDocFlags docFlags = SubdocDocFlags.None)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path. |
SubdocPathFlags | pathFlags | The Subdoc pathFlags. |
SubdocDocFlags | docFlags | The document flags. |
Returns
Type | Description |
---|---|
ILookupInBuilder<TDocument> | A Couchbase.Core.ILookupInBuilder`1 implementation reference for chaining operations. |
Get(string)
Gets the value at a specified N1QL path.
Declaration
public ILookupInBuilder<TDocument> Get(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path. |
Returns
Type | Description |
---|---|
ILookupInBuilder<TDocument> | A Couchbase.Core.ILookupInBuilder`1 implementation reference for chaining operations. |
Get(string, SubdocPathFlags, SubdocDocFlags)
Gets the value at a specified path.
Declaration
public ILookupInBuilder<TDocument> Get(string path, SubdocPathFlags pathFlags, SubdocDocFlags docFlags = SubdocDocFlags.None)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path. |
SubdocPathFlags | pathFlags | The Subdoc pathFlags. |
SubdocDocFlags | docFlags | The document flags. |
Returns
Type | Description |
---|---|
ILookupInBuilder<TDocument> | A Couchbase.Core.ILookupInBuilder`1 implementation reference for chaining operations. |
GetCount(string)
Gets the number of items in a collection or dictionary at a specified N1QL path.
Declaration
public ILookupInBuilder<TDocument> GetCount(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path. |
Returns
Type | Description |
---|---|
ILookupInBuilder<TDocument> | A ILookupInBuilder<TDocument> implementation reference for chaining operations. |
Remarks
Requires Couchbase Server 5.0 or higher
GetCount(string, SubdocPathFlags, SubdocDocFlags)
Gets the number of items in a collection or dictionary at a specified N1QL path.
Declaration
public ILookupInBuilder<TDocument> GetCount(string path, SubdocPathFlags pathFlags, SubdocDocFlags docFlags = SubdocDocFlags.None)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path. |
SubdocPathFlags | pathFlags | The subdocument lookup pathFlags. |
SubdocDocFlags | docFlags | The document flags. |
Returns
Type | Description |
---|---|
ILookupInBuilder<TDocument> | A ILookupInBuilder<TDocument> implementation reference for chaining operations. |
Remarks
Requires Couchbase Server 5.0 or higher
WithTimeout(TimeSpan)
The maximum time allowed for an operation to live before timing out.
Declaration
public ILookupInBuilder<TDocument> WithTimeout(TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | timeout | The timeout. |
Returns
Type | Description |
---|---|
ILookupInBuilder<TDocument> | An ILookupInBuilder<TDocument> reference for chaining operations. |