Table of Contents

Method WithReduce

Namespace
Neo4j.Driver
Assembly
Neo4j.Driver.dll

WithReduce<TResult>(Func<TResult>, Func<TResult, TOut, TResult>)

Specifies a method of reducing many items of type TOut into one instance of type TResult.

IReducedExecutableQuery<TResult> WithReduce<TResult>(Func<TResult> seed, Func<TResult, TOut, TResult> accumulate)

Parameters

seed Func<TResult>

The initial value of the resulting value.

accumulate Func<TResult, TOut, TResult>

A method that will accumulate each value of type TOut into the result value.

Returns

IReducedExecutableQuery<TResult>

The same instance which can only be used to execute the query.

Type Parameters

TResult

The type of the reduced result.

WithReduce<TAccumulate, TResult>(Func<TAccumulate>, Func<TAccumulate, TOut, TAccumulate>, Func<TAccumulate, TResult>)

Specifies a method of reducing many items of type TOut into one instance of type TResult, using one method to accumulate the values into a value of type TAccumulate and another to turn the accumulated value into a result.

IReducedExecutableQuery<TResult> WithReduce<TAccumulate, TResult>(Func<TAccumulate> seed, Func<TAccumulate, TOut, TAccumulate> accumulate, Func<TAccumulate, TResult> selectResult)

Parameters

seed Func<TAccumulate>

The initial value of the accumulating value.

accumulate Func<TAccumulate, TOut, TAccumulate>

A method that will accumulate each value of type TOut into the accumulated value.

selectResult Func<TAccumulate, TResult>

A method that will turn the accumulated value into a value of type TResult.

Returns

IReducedExecutableQuery<TResult>

The same instance which can only be used to execute the query.

Type Parameters

TAccumulate
TResult

The type of the reduced result.