Provides APIs to construct query condition.
Example |
// example 1 : I want to get object whose name is "John" KiiQuery q = new KiiQuery(KiiClause.Equals("name", "John")); // example 2 : I want to get objects whose age >= 18 and score > 80 KiiQuery q = new KiiQuery( KiiClause.And( KiiClause.GreaterThanOrEqual("age", 18), KiiClause.GreaterThan("score", 80)) ); |
See Also: Inherited members from object.
static
|
And
(params KiiClause[])Concatenate KiiCorp.Cloud.Storage.KiiClause with AND operator. |
|
static
|
Equals
(string, bool)Create a clause of equals condition. |
|
static
|
Equals
(string, double)Create a clause of equals condition. |
|
static
|
Equals
(string, int)Create a clause of equals condition. |
|
static
|
Equals
(string, long)Create a clause of equals condition. |
|
static
|
Equals
(string, object)Create a clause of equals condition. |
|
static
|
Equals
(string, string)Create a clause of equals condition. |
|
static
|
GeoBox
(string, KiiGeoPoint, KiiGeoPoint)Create a clause of geo box. |
|
static
|
GeoDistance
(string, KiiGeoPoint, double, string)Create a clause of geo distance. |
|
static
|
GreaterThan
(string, double)Create a clause of greater than. |
|
static
|
GreaterThan
(string, int)Create a clause of greater than. |
|
static
|
GreaterThan
(string, long)Create a clause of greater than. |
|
static
|
GreaterThan
(string, object)Create a clause of greater than. |
|
static
|
GreaterThan
(string, string)Create a clause of greater than. |
|
static
|
GreaterThanOrEqual
(string, double)Create a clause of greater than or equal. |
|
static
|
GreaterThanOrEqual
(string, int)Create a clause of greater than or equal. |
|
static
|
GreaterThanOrEqual
(string, long)Create a clause of greater than or equal. |
|
static
|
GreaterThanOrEqual
(string, object)Create a clause of greater than or equal. |
|
static
|
GreaterThanOrEqual
(string, string)Create a clause of greater than or equal. |
|
static
|
HasField
(string, FieldType)Create a clause to return all entities that have a specified field. |
|
static
|
InWithDoubleValue
(string, params double[])Create a clause of in condition. |
|
static
|
InWithIntValue
(string, params int[])Create a clause of in condition. |
|
static
|
InWithLongValue
(string, params long[])Create a clause of in condition. |
|
static
|
InWithStringValue
(string, params string[])Create a clause of in condition. |
|
static
|
LessThan
(string, double)Create a clause of less than. |
|
static
|
LessThan
(string, int)Create a clause of less than. |
|
static
|
LessThan
(string, long)Create a clause of less than. |
|
static
|
LessThan
(string, object)Create a clause of less than. |
|
static
|
LessThan
(string, string)Create a clause of less than. |
|
static
|
LessThanOrEqual
(string, double)Create a clause of less than or equal. |
|
static
|
LessThanOrEqual
(string, int)Create a clause of less than or equal. |
|
static
|
LessThanOrEqual
(string, long)Create a clause of less than or equal. |
|
static
|
LessThanOrEqual
(string, object)Create a clause of less than or equal. |
|
static
|
LessThanOrEqual
(string, string)Create a clause of less than or equal. |
|
static
|
Not
(KiiClause)Concatenate KiiCorp.Cloud.Storage.KiiClause with NOT operator. |
|
static
|
NotEquals
(string, bool)Create a clause of not equals condition. |
|
static
|
NotEquals
(string, double)Create a clause of not equals condition. |
|
static
|
NotEquals
(string, int)Create a clause of not equals condition. |
|
static
|
NotEquals
(string, long)Create a clause of not equals condition. |
|
static
|
NotEquals
(string, object)Create a clause of not equals condition. |
|
static
|
NotEquals
(string, string)Create a clause of not equals condition. |
|
static
|
Or
(params KiiClause[])Concatenate KiiCorp.Cloud.Storage.KiiClause with OR operator. |
|
static
|
StartsWith
(string, string)Create a clause with the prefix condition. |
Concatenate KiiCorp.Cloud.Storage.KiiClause with AND operator.Syntax
Parameters
- clauses
- Clauses.
Returns
KiiClanse instance.Remarks
Clauses must not be null or empty array.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of equals condition.Syntax
Parameters
- key
- Key.
- value
- Value to be compared.
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of equals condition.Syntax
Parameters
- key
- Key.
- value
- Value to be compared.
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of equals condition.Syntax
Parameters
- key
- Key.
- value
- Value to be compared.
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of equals condition.Syntax
Parameters
- key
- Key.
- value
- Value to be compared.
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of equals condition.Syntax
Parameters
- key
- Key.
- value
- Value to be compared.
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of equals condition.Syntax
Parameters
- key
- Key.
- value
- Value to be compared.
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of geo box.Syntax
Parameters
- key
- Name of the key to inquire, which holds geo point. Must not null or empty string.
- northEast
- North east corner of the rectangle. Must not null.
- southWest
- South west corner of the rectangle. Must not null.
Returns
KiiClause instance.Exceptions
Type Reason ArgumentException Is thrown when an argument is invalid. Please see parameter explanation. Remarks
This clause inquires objects in the specified rectangle. Rectangle would be placed parallel to the equator with specified coordinates of the corner.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of geo distance.Syntax
public static KiiClause GeoDistance (string key, KiiGeoPoint center, double radius, string calculatedDistance)Parameters
- key
- Name of the key to inquire, which holds geo point. Must not null or empty string.
- center
- Geo point which specify center of the circle. Mus not null.
- radius
- Radius of the circle. unit is meter. value should be in range of 0-20000000.
- calculatedDistance
- Calculated distance is used for retrieve distance from the center from the query result. If the specified value is null, query result will not contain the distance.
Returns
KiiClause instance.Exceptions
Type Reason ArgumentException Is thrown when an argument is invalid. Please see parameter explanation. Remarks
This clause inquires objects in the specified circle.Note: You can get the results in ascending order of distances from center. To do so, build the orderBy field by "_calculated.{specified value of calculatedDistance}" and pass it in KiiQuery.SortByAsc(). Note that, descending order of distances is not supported. The unit of distance is meter. KiiCorp.Cloud.Storage.KiiObject
Example // example string calculatedDistance = "distanceFromCurrentLoc"; KiiGeoPoint currentLoc = KiiGeoPoint(120.000,77.000); //dummy location KiiClause geoDist = KiiClause("location",currentLoc, 7.0,calculatedDistance); KiiQuery query = KiiQuery.QueryWithClause(geoDist); // sort distance ny ascending order. string orderByKey = "_calculated."+ calculatedDistance; query.SortByAsc(orderByKey); KiiBucket bucket = Kii.Bucket("MyBucket"); KiiQueryResult<KiiObject> result = bucket.Query(query); if(result.Size > 0) { KiiObject object = result[0]; double distanceInMeter = object.GetJsonObject("_calculated").GetDouble(calculatedDistance); }Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of greater than.Syntax
Parameters
- key
- Key.
- value
- Value to be compared
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of greater than.Syntax
Parameters
- key
- Key.
- value
- Value to be compared
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of greater than.Syntax
Parameters
- key
- Key.
- value
- Value to be compared
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of greater than.Syntax
Parameters
- key
- Key.
- value
- Value to be compared
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of greater than.Syntax
Parameters
- key
- Key.
- value
- Value to be compared
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of greater than or equal.Syntax
Parameters
- key
- Key.
- value
- Value to be compared
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of greater than or equal.Syntax
Parameters
- key
- Key.
- value
- Value to be compared
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of greater than or equal.Syntax
Parameters
- key
- Key.
- value
- Value to be compared
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of greater than or equal.Syntax
Parameters
- key
- Key.
- value
- Value to be compared
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of greater than or equal.Syntax
Parameters
- key
- Key.
- value
- Value to be compared
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause to return all entities that have a specified field.Syntax
Parameters
- key
- Name of the specified field.
- fieldType
- The type of the content of the field.
Returns
KiiClause instance.Remarks
The type of the content of the field must be provided, possible values are "STRING", "INTEGER", "DECIMAL" and "BOOLEAN".Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of in condition.Syntax
Parameters
- key
- Key.
- value
- Values to be compared. The length of values array should be less than or equals to 200.
Returns
KiiClause instanceExceptions
Type Reason ArgumentException Is thrown in the following cases:
- key is null.
- value is null or length of value is 0.
- length of value is more than 200.
JsonOrg.JsonException Is thrown when the unexpected invalid params given. Remarks
Query records matches with key-value specified by argument. More efficient than using combination of "equals" and "or" When querying the multiple records with specific key.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of in condition.Syntax
Parameters
- key
- Key.
- value
- Values to be compared. The length of values array should be less than or equals to 200.
Returns
KiiClause instanceExceptions
Type Reason ArgumentException Is thrown in the following cases:
- key is null.
- value is null or length of value is 0.
- length of value is more than 200.
JsonOrg.JsonException Is thrown when the unexpected invalid params given. Remarks
Query records matches with key-value specified by argument. More efficient than using combination of "equals" and "or" When querying the multiple records with specific key.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of in condition.Syntax
Parameters
- key
- Key.
- value
- Values to be compared. The length of values array should be less than or equals to 200.
Returns
KiiClause instanceExceptions
Type Reason ArgumentException Is thrown in the following cases:
- key is null.
- value is null or length of value is 0.
- length of value is more than 200.
JsonOrg.JsonException Is thrown when the unexpected invalid params given. Remarks
Query records matches with key-value specified by argument. More efficient than using combination of "equals" and "or" When querying the multiple records with specific key.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of in condition.Syntax
Parameters
- key
- Key.
- value
- Values to be compared. The length of values array should be less than or equals to 200.
Returns
KiiClause instanceExceptions
Type Reason ArgumentException Is thrown in the following cases:
- key is null.
- value is null or length of value is 0.
- length of value is more than 200.
JsonOrg.JsonException Is thrown when the unexpected invalid params given. Remarks
Query records matches with key-value specified by argument. More efficient than using combination of "equals" and "or" When querying the multiple records with specific key.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of less than.Syntax
Parameters
- key
- Key.
- value
- Value to be compared
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of less than.Syntax
Parameters
- key
- Key.
- value
- Value to be compared
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of less than.Syntax
Parameters
- key
- Key.
- value
- Value to be compared
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of less than.Syntax
Parameters
- key
- Key.
- value
- Value to be compared
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of less than.Syntax
Parameters
- key
- Key.
- value
- Value to be compared
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of less than or equal.Syntax
Parameters
- key
- Key.
- value
- Value to be compared
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of less than or equal.Syntax
Parameters
- key
- Key.
- value
- Value to be compared
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of less than or equal.Syntax
Parameters
- key
- Key.
- value
- Value to be compared
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of less than or equal.Syntax
Parameters
- key
- Key.
- value
- Value to be compared
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of less than or equal.Syntax
Parameters
- key
- Key.
- value
- Value to be compared
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Concatenate KiiCorp.Cloud.Storage.KiiClause with NOT operator.Syntax
Parameters
- clause
- Clause.
Returns
KiiClanse instance.Remarks
Query performance will be worse as the number of objects in bucket increases, so we recommend you avoid the OR clause if possible.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of not equals condition.Syntax
Parameters
- key
- Key.
- value
- Value to be compared.
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of not equals condition.Syntax
Parameters
- key
- Key.
- value
- Value to be compared.
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of not equals condition.Syntax
Parameters
- key
- Key.
- value
- Value to be compared.
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of not equals condition.Syntax
Parameters
- key
- Key.
- value
- Value to be compared.
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of not equals condition.Syntax
Parameters
- key
- Key.
- value
- Value to be compared.
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause of not equals condition.Syntax
Parameters
- key
- Key.
- value
- Value to be compared.
Returns
KiiClause instance.Remarks
If type of value in Object is different, it won't be included in a result.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Concatenate KiiCorp.Cloud.Storage.KiiClause with OR operator.Syntax
Parameters
- clauses
- Clauses.
Returns
KiiClanse instance.Remarks
Clauses must not be null or empty array. Query performance will be worse as the number of objects in bucket increases, so we recommend you avoid the OR clause if possible.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0
Create a clause with the prefix condition.Syntax
Parameters
- key
- Key.
- value
- Value to be compared
Returns
KiiClause instance.Remarks
It matches the specified key's value to be starts with the specified value.Requirements
Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0