View Compiler

View Compiler

An object that can be used to compile source code into map and reduce delegates.

Syntax


@protocol CBLViewCompiler <NSObject>
protocol CBLViewCompiler
public interface ViewCompiler
public interface ViewCompiler
public interface IViewCompiler

Summary


Methods
MapDelegate
compileMap(String source, String language)
Compiles source code into a MapDelegate.
ReduceDelegate
compileReduce(String source, String language)
Compiles source code into a ReduceDelegate.

Methods


MapDelegate compileMap(String source, String language)
Compiles source code into a MapDelegate.

Parameters

source The source code to compile into a MapDelegate.
language The language of the source.

Returns

A compiled MapDelegate.

Syntax

-(CBLMapBlock)compileMapFunction:(NSString *)mapSource language:(NSString *)language
func compileMapFunction(mapSource: String!, language: String!) -> CBLMapBlock!
public Mapper compileMap(String source, String language)
public Mapper compileMap(String source, String language)
MapDelegate CompileMap(String source, String language)
ReduceDelegate compileReduce(String source, String language)
Compiles source code into a ReduceDelegate.

Parameters

source The source code to compile into a ReduceDelegate.
language The language of the source.

Returns

A compiled ReduceDelegate.

Syntax

-(CBLReduceBlock)compileReduceFunction:(NSString *)reduceSource language:(NSString *)language
func compileReduceFunction(reduceSource: String!, language: String!) -> CBLReduceBlock
public Reducer compileReduce(String source, String language)
public Reducer compileReduce(String source, String language)
ReduceDelegate CompileReduce(String source, String language)