C# Class MongoDB.Driver.MapReduceBuilder

Provides a Fluent interface to build and execute Map/Reduce calls.
Inheritance: IDisposable
Afficher le fichier Open project: sdether/mongodb-csharp Class Usage Examples

Méthodes publiques

Méthode Description
Dispose ( ) : void
Execute ( ) : MapReduce
Finalize ( Code function ) : MapReduceBuilder

Function to apply to all the results when finished.

KeepTemp ( bool keep ) : MapReduceBuilder

When true the generated collection is not treated as temporary. Specifying out automatically makes the collection permanent

Limit ( long limit ) : MapReduceBuilder

Number of objects to return from collection

Map ( Code function ) : MapReduceBuilder

The map function references the variable this to inspect the current object under consideration. A map function must call emit(key,value) at least once, but may be invoked any number of times, as may be appropriate.

Map ( string function ) : MapReduceBuilder

The map function references the variable this to inspect the current object under consideration. A map function must call emit(key,value) at least once, but may be invoked any number of times, as may be appropriate.

MapReduceBuilder ( MapReduce mr ) : System
Out ( String name ) : MapReduceBuilder

Name of the final collection the results should be stored in.

A temporary collection is still used and then renamed to the target name atomically.

Query ( Document query ) : MapReduceBuilder

Query filter object

Reduce ( Code function ) : MapReduceBuilder

The reduce function receives a key and an array of values. To use, reduce the received values, and return a result.

The MapReduce engine may invoke reduce functions iteratively; thus, these functions must be idempotent. If you need to perform an operation only once, use a finalize function.

Reduce ( string function ) : MapReduceBuilder

The reduce function receives a key and an array of values. To use, reduce the received values, and return a result.

The MapReduce engine may invoke reduce functions iteratively; thus, these functions must be idempotent. If you need to perform an operation only once, use a finalize function.

Scope ( Document scope ) : MapReduceBuilder

Document where fields go into javascript global scope

Sort ( Document sort ) : MapReduceBuilder

Sort the query. Useful for optimization

Verbose ( bool val ) : MapReduceBuilder

Provides statistics on job execution time.

Method Details

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Execute() public méthode

public Execute ( ) : MapReduce
Résultat MapReduce

Finalize() public méthode

Function to apply to all the results when finished.
public Finalize ( Code function ) : MapReduceBuilder
function Code
Résultat MapReduceBuilder

KeepTemp() public méthode

When true the generated collection is not treated as temporary. Specifying out automatically makes the collection permanent
public KeepTemp ( bool keep ) : MapReduceBuilder
keep bool
Résultat MapReduceBuilder

Limit() public méthode

Number of objects to return from collection
public Limit ( long limit ) : MapReduceBuilder
limit long
Résultat MapReduceBuilder

Map() public méthode

The map function references the variable this to inspect the current object under consideration. A map function must call emit(key,value) at least once, but may be invoked any number of times, as may be appropriate.
public Map ( Code function ) : MapReduceBuilder
function Code
Résultat MapReduceBuilder

Map() public méthode

The map function references the variable this to inspect the current object under consideration. A map function must call emit(key,value) at least once, but may be invoked any number of times, as may be appropriate.
public Map ( string function ) : MapReduceBuilder
function string
Résultat MapReduceBuilder

MapReduceBuilder() public méthode

public MapReduceBuilder ( MapReduce mr ) : System
mr MapReduce
Résultat System

Out() public méthode

Name of the final collection the results should be stored in.
A temporary collection is still used and then renamed to the target name atomically.
public Out ( String name ) : MapReduceBuilder
name String
Résultat MapReduceBuilder

Query() public méthode

Query filter object
public Query ( Document query ) : MapReduceBuilder
query Document
Résultat MapReduceBuilder

Reduce() public méthode

The reduce function receives a key and an array of values. To use, reduce the received values, and return a result.
The MapReduce engine may invoke reduce functions iteratively; thus, these functions must be idempotent. If you need to perform an operation only once, use a finalize function.
public Reduce ( Code function ) : MapReduceBuilder
function Code
Résultat MapReduceBuilder

Reduce() public méthode

The reduce function receives a key and an array of values. To use, reduce the received values, and return a result.
The MapReduce engine may invoke reduce functions iteratively; thus, these functions must be idempotent. If you need to perform an operation only once, use a finalize function.
public Reduce ( string function ) : MapReduceBuilder
function string
Résultat MapReduceBuilder

Scope() public méthode

Document where fields go into javascript global scope
public Scope ( Document scope ) : MapReduceBuilder
scope Document
Résultat MapReduceBuilder

Sort() public méthode

Sort the query. Useful for optimization
public Sort ( Document sort ) : MapReduceBuilder
sort Document
Résultat MapReduceBuilder

Verbose() public méthode

Provides statistics on job execution time.
public Verbose ( bool val ) : MapReduceBuilder
val bool
Résultat MapReduceBuilder