Couchbase .NET SDK __CB_SDK_VERSION__

Show / Hide Table of Contents

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

View Source

AddChildren(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.

View Source

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.

View Source

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.

View Source

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.

  • View Source
In this article
Back to top Copyright © 2020 Couchbase, Inc. All rights reserved.