C# OJAI Client API
MapRDB.Driver.Ojai.OjaiQuery Class Reference
Inheritance diagram for MapRDB.Driver.Ojai.OjaiQuery:
MapRDB.Driver.Ojai.IQuery

Public Member Functions

string ToJsonString ()
 Parse query into JSON string. More...
 
string ToJsonString (Formatting formatting)
 Parse query into JSON string. More...
 
IDictionary< string, Object > ToDictionary ()
 Parse query into dictionary. More...
 
IQuery Select (params string[] fieldPaths)
 Adds the list of field paths to the list of projected fields. If not specified, the entire Document will be returned. Multiple invocation will append new fields to the list. More...
 
IQuery Where (IQueryCondition conditionJson)
 Sets the filtering condition for the query. Multiple invocation will 'AND' the individual conditions. More...
 
IQuery OrderBy (params string[] fieldPaths)
 Sets the sort ordering of the returned Documents to the ascending order of specified field paths. Multiple invocation will append the field to the sort list. If field paths are empty do nothing. More...
 
IQuery OrderBy (string field, SortOrder order)
 Sets the sort ordering of the returned Documents to the specified field and order. Multiple invocation will append the field to the sort list. More...
 
IQuery Offset (ulong offset)
 (0) based index which specifies number of Documents to skip before returning any result. Negative values are not permitted. Multiple invocation will overwrite the previous value. More...
 
IQuery Limit (ulong limit)
 Restricts the maximum number of documents returned from this query to the specified value. Negative values are not permitted. Multiple invocation will overwrite the previous value. More...
 
IQuery SetMaxClientSortLimit (int value)
 Sets maximum size of client sort limit. More...
 
IQuery Build ()
 Builds this Query object and make it immutable. More...
 

Properties

bool IsBuilt [get, private set]
 

Private Member Functions

void MergeDictionaries (IDictionary< string, Object > dict1, IDictionary< string, Object > dict2)
 Private method to merge two dictionaries into the first one. More...
 
void MergeLists (IList list1, IList list2)
 Private method to merge two lists into the first one. More...
 

Private Attributes

IDictionary< string, Object > _queryDictionary
 

Member Function Documentation

◆ Build()

IQuery MapRDB.Driver.Ojai.OjaiQuery.Build ( )

Builds this Query object and make it immutable.

Implements MapRDB.Driver.Ojai.IQuery.

◆ Limit()

IQuery MapRDB.Driver.Ojai.OjaiQuery.Limit ( ulong  limit)

Restricts the maximum number of documents returned from this query to the specified value. Negative values are not permitted. Multiple invocation will overwrite the previous value.

Implements MapRDB.Driver.Ojai.IQuery.

◆ MergeDictionaries()

void MapRDB.Driver.Ojai.OjaiQuery.MergeDictionaries ( IDictionary< string, Object >  dict1,
IDictionary< string, Object >  dict2 
)
private

Private method to merge two dictionaries into the first one.

◆ MergeLists()

void MapRDB.Driver.Ojai.OjaiQuery.MergeLists ( IList  list1,
IList  list2 
)
private

Private method to merge two lists into the first one.

◆ Offset()

IQuery MapRDB.Driver.Ojai.OjaiQuery.Offset ( ulong  offset)

(0) based index which specifies number of Documents to skip before returning any result. Negative values are not permitted. Multiple invocation will overwrite the previous value.

Implements MapRDB.Driver.Ojai.IQuery.

◆ OrderBy() [1/2]

IQuery MapRDB.Driver.Ojai.OjaiQuery.OrderBy ( params string []  fieldPaths)

Sets the sort ordering of the returned Documents to the ascending order of specified field paths. Multiple invocation will append the field to the sort list. If field paths are empty do nothing.

Implements MapRDB.Driver.Ojai.IQuery.

◆ OrderBy() [2/2]

IQuery MapRDB.Driver.Ojai.OjaiQuery.OrderBy ( string  field,
SortOrder  order 
)

Sets the sort ordering of the returned Documents to the specified field and order. Multiple invocation will append the field to the sort list.

Implements MapRDB.Driver.Ojai.IQuery.

◆ Select()

IQuery MapRDB.Driver.Ojai.OjaiQuery.Select ( params string []  fieldPaths)

Adds the list of field paths to the list of projected fields. If not specified, the entire Document will be returned. Multiple invocation will append new fields to the list.

Implements MapRDB.Driver.Ojai.IQuery.

◆ SetMaxClientSortLimit()

IQuery MapRDB.Driver.Ojai.OjaiQuery.SetMaxClientSortLimit ( int  value)

Sets maximum size of client sort limit.

Implements MapRDB.Driver.Ojai.IQuery.

◆ ToDictionary()

IDictionary<string, Object> MapRDB.Driver.Ojai.OjaiQuery.ToDictionary ( )

Parse query into dictionary.

Implements MapRDB.Driver.Ojai.IQuery.

◆ ToJsonString() [1/2]

string MapRDB.Driver.Ojai.OjaiQuery.ToJsonString ( )

Parse query into JSON string.

Implements MapRDB.Driver.Ojai.IQuery.

◆ ToJsonString() [2/2]

string MapRDB.Driver.Ojai.OjaiQuery.ToJsonString ( Formatting  formatting)

Parse query into JSON string.

Implements MapRDB.Driver.Ojai.IQuery.

◆ Where()

IQuery MapRDB.Driver.Ojai.OjaiQuery.Where ( IQueryCondition  conditionJson)

Sets the filtering condition for the query. Multiple invocation will 'AND' the individual conditions.

Implements MapRDB.Driver.Ojai.IQuery.