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
| Improve this Doc 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<System.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<System.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. |