C# Class MongoDB.MapReduce

Provides a Fluent interface to build and execute Map/Reduce calls.
Inheritance: IDisposable
Datei anzeigen Open project: oz-systems/mongodb-csharp

Private Properties

Property Type Description
RetrieveData void
TryModify void

Public Methods

Method Description
Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Finalize ( Code function ) : MapReduce

Function to apply to all the results when finished.

KeepTemp ( bool keep ) : MapReduce

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

Limit ( long limit ) : MapReduce

Number of objects to return from collection

Map ( Code function ) : MapReduce

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 ) : MapReduce

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.

MapReduce ( IMongoDatabase database, string name, Type rootType ) : System

Initializes a new instance of the MapReduce class.

Out ( Document @out ) : MapReduce

Specifies how to handle the final collection of results

Out ( String name ) : MapReduce

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 ) : MapReduce

Query filter object

Reduce ( Code function ) : MapReduce

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 ) : MapReduce

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 ) : MapReduce

Document where fields go into javascript global scope

Sort ( Document sort ) : MapReduce

Sort the query. Useful for optimization

Verbose ( bool val ) : MapReduce

Provides statistics on job execution time.

Private Methods

Method Description
RetrieveData ( ) : void

Retrieves the data.

TryModify ( ) : void

Tries the modify.

Method Details

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

Finalize() public method

Function to apply to all the results when finished.
public Finalize ( Code function ) : MapReduce
function Code
return MapReduce

KeepTemp() public method

When true the generated collection is not treated as temporary. Specifying out automatically makes the collection permanent
public KeepTemp ( bool keep ) : MapReduce
keep bool
return MapReduce

Limit() public method

Number of objects to return from collection
public Limit ( long limit ) : MapReduce
limit long
return MapReduce

Map() public method

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 ) : MapReduce
function Code
return MapReduce

Map() public method

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 ) : MapReduce
function string
return MapReduce

MapReduce() public method

Initializes a new instance of the MapReduce class.
public MapReduce ( IMongoDatabase database, string name, Type rootType ) : System
database IMongoDatabase The database.
name string The name.
rootType System.Type Type of the root.
return System

Out() public method

Specifies how to handle the final collection of results
public Out ( Document @out ) : MapReduce
@out Document
return MapReduce

Out() public method

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 ) : MapReduce
name String
return MapReduce

Query() public method

Query filter object
public Query ( Document query ) : MapReduce
query Document
return MapReduce

Reduce() public method

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 ) : MapReduce
function Code
return MapReduce

Reduce() public method

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 ) : MapReduce
function string
return MapReduce

Scope() public method

Document where fields go into javascript global scope
public Scope ( Document scope ) : MapReduce
scope Document
return MapReduce

Sort() public method

Sort the query. Useful for optimization
public Sort ( Document sort ) : MapReduce
sort Document
return MapReduce

Verbose() public method

Provides statistics on job execution time.
public Verbose ( bool val ) : MapReduce
val bool
return MapReduce