C# OJAI Client API
|
Public Member Functions | |
string | ToJsonString () |
Parse query condition into JSON string. More... | |
string | ToJsonString (Formatting formatting) |
Parse query condition into JSON string. More... | |
IDictionary< string, Object > | ToDictionary () |
Parse query condition into dictionary. More... | |
IQueryCondition | And () |
Begins a new AND compound condition block. More... | |
IQueryCondition | Or () |
Begins a new OR compound condition block. More... | |
IQueryCondition | ElementAnd (string path) |
Begins a new ElementAnd compound condition block. More... | |
IQueryCondition | Close () |
Closes a compound condition block. More... | |
IQueryCondition | Build () |
Builds this QueryCondition object and makes it immutable. More... | |
IQueryCondition | Condition (IQueryCondition conditionToAdd) |
Appends the specified condition to the current condition block. More... | |
IQueryCondition | Exists (string path) |
Adds a condition that tests for existence of the specified FieldPath. More... | |
IQueryCondition | NotExists (string path) |
Adds a condition that tests for non-existence of the specified FieldPath. More... | |
IQueryCondition | In (string path, IList< Object > listOfValue) |
Adds a condition that tests if the Value at the specified FieldPath is equal to at least one of the values in the specified List. More... | |
IQueryCondition | NotIn (string path, IList< Object > listOfValue) |
Adds a condition that tests if the Value at the specified FieldPath is not equal to any of the values in the specified List. More... | |
IQueryCondition | TypeOf (string path, Type type) |
Adds a condition that tests if the Value at the specified FieldPath is of the specified Type. More... | |
IQueryCondition | NotTypeOf (string path, Type type) |
Adds a condition that tests if the Value at the specified FieldPath is not of the specified Type. More... | |
IQueryCondition | Matches (string path, string regex) |
Adds a condition that tests if the Value at the specified FieldPath is a string and matches the specified regular expression. More... | |
IQueryCondition | NotMatches (string path, string regex) |
Adds a condition that tests if the Value at the specified FieldPath is a string and not matches the specified regular expression. More... | |
IQueryCondition | Like (string path, string likeExpression) |
Adds a condition that tests if the Value at the specified FieldPath is a string and matches the specified SQL LIKE expression. More... | |
IQueryCondition | Like (string path, string likeExpression, char escapeChar) |
Adds a condition that tests if the Value at the specified FieldPath is a string and matches the specified SQL LIKE expression optionally escaped with the specified escape character. More... | |
IQueryCondition | NotLike (string path, string likeExpression) |
Adds a condition that tests if the Value at the specified FieldPath is a string and not matches the specified SQL LIKE expression. More... | |
IQueryCondition | NotLike (string path, string likeExpression, char escapeChar) |
Adds a condition that tests if the Value at the specified FieldPath is a string and not matches the specified SQL LIKE expression optionally escaped with the specified escape character. More... | |
IQueryCondition | Is (string path, QueryOp op, bool value) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified bool value. More... | |
IQueryCondition | Is (string path, QueryOp op, string value) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified string value. More... | |
IQueryCondition | Is (string path, QueryOp op, byte value) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified byte value. More... | |
IQueryCondition | Is (string path, QueryOp op, short value) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified short value. More... | |
IQueryCondition | Is (string path, QueryOp op, int value) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified int value. More... | |
IQueryCondition | Is (string path, QueryOp op, long value) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified long value. More... | |
IQueryCondition | Is (string path, QueryOp op, float value) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified float value. More... | |
IQueryCondition | Is (string path, QueryOp op, double value) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified double value. More... | |
IQueryCondition | Is (string path, QueryOp op, decimal value) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified decimal value. More... | |
IQueryCondition | Is (string path, QueryOp op, OjaiDate value) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified OjaiDate value. More... | |
IQueryCondition | Is (string path, QueryOp op, OjaiTime value) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified OjaiTime value. More... | |
IQueryCondition | Is (string path, QueryOp op, OjaiTimestamp value) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified OjaiTimestamp value. More... | |
IQueryCondition | Is (string path, QueryOp op, OjaiInterval value) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified OjaiInterval value. More... | |
IQueryCondition | Is (string path, QueryOp op, byte[] value) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified byte[] value. More... | |
IQueryCondition | Equals (string path, IDictionary< string, Object > value) |
Adds a condition that tests if the Value at the specified FieldPath equals the specified Dictionary value. Two Dictionaries are considered equal if and only if they contain the same key-value pair in the same order. More... | |
IQueryCondition | Equals (string path, IList< Object > value) |
Adds a condition that tests if the Value at the specified FieldPath equals the specified List value. More... | |
IQueryCondition | NotEquals (string path, IDictionary< string, Object > value) |
Adds a condition that tests if the Value at the specified FieldPath not equals the specified Dictionary value. Two Dictionaries are considered equal if and only if they contain the same key-value pair in the same order. More... | |
IQueryCondition | NotEquals (string path, IList< Object > value) |
Adds a condition that tests if the Value at the specified FieldPath not equals the specified List value. More... | |
IQueryCondition | SizeOf (string path, QueryOp op, long size) |
Adds a condition that tests if the size of the Value at the specified FieldPath satisfies the given QueryOp and the size. The value must be one of the following types: string, binary, IDictionary or IList. More... | |
Public Attributes | |
bool | IsEmpty => _queryDictionary.Count == 0 |
Properties | |
bool | IsBuilt [get, private set] |
Properties inherited from MapRDB.Driver.Ojai.IQueryCondition | |
bool | IsBuilt [get] |
bool | IsEmpty [get] |
Private Member Functions | |
IQueryCondition | SetIs (string path, QueryOp op, object value) |
Private method to set Is condition with given QueryOp against the specified value. More... | |
void | BuildFromTokens () |
Private method to build query condition fron token queue. More... | |
void | MergeDictionaries (QueryDictionary dict1, QueryDictionary dict2) |
Private method to merge two dictionaries into first one. More... | |
void | MergeLists (IList list1, IList list2) |
Private method to merge two lists into first one. More... | |
QueryDictionary | BuildBlock (string op) |
Private method to build block of conditions. More... | |
IEnumerable< Object > | ConvertList (IList< Object > list) |
Converts list of objects into list of their OJAI representation. More... | |
Private Attributes | |
Queue< Object > | _tokens |
QueryDictionary | _queryDictionary |
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.And | ( | ) |
Begins a new AND compound condition block.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Build | ( | ) |
Builds this QueryCondition object and makes it immutable.
Implements MapRDB.Driver.Ojai.IQueryCondition.
|
private |
Private method to build block of conditions.
|
private |
Private method to build query condition fron token queue.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Close | ( | ) |
Closes a compound condition block.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Condition | ( | IQueryCondition | conditionToAdd | ) |
Appends the specified condition to the current condition block.
Implements MapRDB.Driver.Ojai.IQueryCondition.
|
private |
Converts list of objects into list of their OJAI representation.
list |
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.ElementAnd | ( | string | path | ) |
Begins a new ElementAnd compound condition block.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Equals | ( | string | path, |
IDictionary< string, Object > | value | ||
) |
Adds a condition that tests if the Value at the specified FieldPath equals the specified Dictionary value. Two Dictionaries are considered equal if and only if they contain the same key-value pair in the same order.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Equals | ( | string | path, |
IList< Object > | value | ||
) |
Adds a condition that tests if the Value at the specified FieldPath equals the specified List value.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Exists | ( | string | path | ) |
Adds a condition that tests for existence of the specified FieldPath.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.In | ( | string | path, |
IList< Object > | listOfValue | ||
) |
Adds a condition that tests if the Value at the specified FieldPath is equal to at least one of the values in the specified List.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Is | ( | string | path, |
QueryOp | op, | ||
bool | value | ||
) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified bool value.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Is | ( | string | path, |
QueryOp | op, | ||
string | value | ||
) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified string value.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Is | ( | string | path, |
QueryOp | op, | ||
byte | value | ||
) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified byte value.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Is | ( | string | path, |
QueryOp | op, | ||
short | value | ||
) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified short value.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Is | ( | string | path, |
QueryOp | op, | ||
int | value | ||
) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified int value.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Is | ( | string | path, |
QueryOp | op, | ||
long | value | ||
) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified long value.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Is | ( | string | path, |
QueryOp | op, | ||
float | value | ||
) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified float value.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Is | ( | string | path, |
QueryOp | op, | ||
double | value | ||
) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified double value.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Is | ( | string | path, |
QueryOp | op, | ||
decimal | value | ||
) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified decimal value.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Is | ( | string | path, |
QueryOp | op, | ||
OjaiDate | value | ||
) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified OjaiDate value.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Is | ( | string | path, |
QueryOp | op, | ||
OjaiTime | value | ||
) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified OjaiTime value.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Is | ( | string | path, |
QueryOp | op, | ||
OjaiTimestamp | value | ||
) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified OjaiTimestamp value.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Is | ( | string | path, |
QueryOp | op, | ||
OjaiInterval | value | ||
) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified OjaiInterval value.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Is | ( | string | path, |
QueryOp | op, | ||
byte [] | value | ||
) |
Adds a condition that tests if the Value at the specified FieldPath satisfies the given QueryOp against the specified byte[] value.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Like | ( | string | path, |
string | likeExpression | ||
) |
Adds a condition that tests if the Value at the specified FieldPath is a string and matches the specified SQL LIKE expression.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Like | ( | string | path, |
string | likeExpression, | ||
char | escapeChar | ||
) |
Adds a condition that tests if the Value at the specified FieldPath is a string and matches the specified SQL LIKE expression optionally escaped with the specified escape character.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Matches | ( | string | path, |
string | regex | ||
) |
Adds a condition that tests if the Value at the specified FieldPath is a string and matches the specified regular expression.
Implements MapRDB.Driver.Ojai.IQueryCondition.
|
private |
Private method to merge two dictionaries into first one.
|
private |
Private method to merge two lists into first one.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.NotEquals | ( | string | path, |
IDictionary< string, Object > | value | ||
) |
Adds a condition that tests if the Value at the specified FieldPath not equals the specified Dictionary value. Two Dictionaries are considered equal if and only if they contain the same key-value pair in the same order.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.NotEquals | ( | string | path, |
IList< Object > | value | ||
) |
Adds a condition that tests if the Value at the specified FieldPath not equals the specified List value.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.NotExists | ( | string | path | ) |
Adds a condition that tests for non-existence of the specified FieldPath.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.NotIn | ( | string | path, |
IList< Object > | listOfValue | ||
) |
Adds a condition that tests if the Value at the specified FieldPath is not equal to any of the values in the specified List.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.NotLike | ( | string | path, |
string | likeExpression | ||
) |
Adds a condition that tests if the Value at the specified FieldPath is a string and not matches the specified SQL LIKE expression.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.NotLike | ( | string | path, |
string | likeExpression, | ||
char | escapeChar | ||
) |
Adds a condition that tests if the Value at the specified FieldPath is a string and not matches the specified SQL LIKE expression optionally escaped with the specified escape character.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.NotMatches | ( | string | path, |
string | regex | ||
) |
Adds a condition that tests if the Value at the specified FieldPath is a string and not matches the specified regular expression.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.NotTypeOf | ( | string | path, |
Type | type | ||
) |
Adds a condition that tests if the Value at the specified FieldPath is not of the specified Type.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.Or | ( | ) |
Begins a new OR compound condition block.
Implements MapRDB.Driver.Ojai.IQueryCondition.
|
private |
Private method to set Is condition with given QueryOp against the specified value.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.SizeOf | ( | string | path, |
QueryOp | op, | ||
long | size | ||
) |
Adds a condition that tests if the size of the Value at the specified FieldPath satisfies the given QueryOp and the size. The value must be one of the following types: string, binary, IDictionary or IList.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IDictionary<string, Object> MapRDB.Driver.Ojai.OjaiQueryCondition.ToDictionary | ( | ) |
Parse query condition into dictionary.
Implements MapRDB.Driver.Ojai.IQueryCondition.
string MapRDB.Driver.Ojai.OjaiQueryCondition.ToJsonString | ( | ) |
Parse query condition into JSON string.
Implements MapRDB.Driver.Ojai.IQueryCondition.
string MapRDB.Driver.Ojai.OjaiQueryCondition.ToJsonString | ( | Formatting | formatting | ) |
Parse query condition into JSON string.
Implements MapRDB.Driver.Ojai.IQueryCondition.
IQueryCondition MapRDB.Driver.Ojai.OjaiQueryCondition.TypeOf | ( | string | path, |
Type | type | ||
) |
Adds a condition that tests if the Value at the specified FieldPath is of the specified Type.
Implements MapRDB.Driver.Ojai.IQueryCondition.