Interface IProjectionBuilder
Interface for projecting sub-document operations onto a target class.
Namespace: Couchbase.Core.IO.Serializers
Assembly: Couchbase.NetClient.dll
Syntax
public interface IProjectionBuilder
Methods
| Edit this page View SourceAddChildren(IReadOnlyCollection<string>, ReadOnlyMemory<byte>)
Adds all children for a subset when an entire document is retreived in the spec.
Declaration
void AddChildren(IReadOnlyCollection<string> children, ReadOnlyMemory<byte> specValue)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyCollection<string> | children | List of child attributes to be retained. |
ReadOnlyMemory<byte> | specValue | Data returned that represents the entire document. |
Remarks
This is typically used when a large number of projections are requested as an optimization.
AddPath(string, ReadOnlyMemory<byte>)
Adds a value for a sub-document operation at a specific path.
Declaration
void AddPath(string path, ReadOnlyMemory<byte> specValue)
Parameters
Type | Name | Description |
---|---|---|
string | path | Path of the sub-document operation. |
ReadOnlyMemory<byte> | specValue | Data returned for the operation. |
ToObject<T>()
Converts the collected projections to a target object.
Declaration
T ToObject<T>()
Returns
Type | Description |
---|---|
T | The new object. |
Type Parameters
Name | Description |
---|---|
T | Type of object. |
ToPrimitive<T>()
Converts one of the projections to a target primitive type.
Declaration
T ToPrimitive<T>()
Returns
Type | Description |
---|---|
T | The value of the projections. |
Type Parameters
Name | Description |
---|---|
T | Primitive type. |