LeanCloud C# SDK
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Properties | List of all members
LeanCloud.Storage.LCQuery< T > Class Template Reference

The LCQuery class defines a query that is used to fetch LCObjects. More...

Inheritance diagram for LeanCloud.Storage.LCQuery< T >:

Public Member Functions

 LCQuery (string className, string endpoint)
 Constructs a LCQuery for class.
 
 LCQuery (string className)
 
 LCQuery (string className, string endpoint)
 
LCQuery< T > WhereEqualTo (string key, object value)
 The value corresponding to key is equal to value, or the array corresponding to key contains value.
 
LCQuery< T > WhereNotEqualTo (string key, object value)
 The value corresponding to key is not equal to value, or the array corresponding to key does not contain value.
 
LCQuery< T > WhereContainedIn (string key, IEnumerable values)
 Values contains value corresponding to key, or values contains at least one element in the array corresponding to key.
 
LCQuery< T > WhereNotContainedIn (string key, IEnumerable values)
 The value of key must not be contained in values.
 
LCQuery< T > WhereContainsAll (string key, IEnumerable values)
 The array corresponding to key contains all elements in values.
 
LCQuery< T > WhereExists (string key)
 The attribute corresponding to key exists.
 
LCQuery< T > WhereDoesNotExist (string key)
 The attribute corresponding to key does not exist.
 
LCQuery< T > WhereSizeEqualTo (string key, int size)
 The size of the array corresponding to key is equal to size.
 
LCQuery< T > WhereGreaterThan (string key, object value)
 The value corresponding to key is greater than value.
 
LCQuery< T > WhereGreaterThanOrEqualTo (string key, object value)
 The value corresponding to key is greater than or equal to value.
 
LCQuery< T > WhereLessThan (string key, object value)
 The value corresponding to key is less than value.
 
LCQuery< T > WhereLessThanOrEqualTo (string key, object value)
 The value corresponding to key is less than or equal to value.
 
LCQuery< T > WhereNear (string key, LCGeoPoint point)
 The value corresponding to key is near the point.
 
LCQuery< T > WhereWithinGeoBox (string key, LCGeoPoint southwest, LCGeoPoint northeast)
 The value corresponding to key is in the given rectangular geographic bounding box.
 
LCQuery< T > WhereWithinRadians (string key, LCGeoPoint point, double maxDistance)
 
LCQuery< T > WhereWithinMiles (string key, LCGeoPoint point, double maxDistance)
 
LCQuery< T > WhereWithinKilometers (string key, LCGeoPoint point, double maxDistance)
 
LCQuery< T > WhereRelatedTo (LCObject parent, string key)
 The value corresponding to key is related to the parent.
 
LCQuery< T > WhereStartsWith (string key, string prefix)
 The string corresponding to key has a prefix.
 
LCQuery< T > WhereEndsWith (string key, string suffix)
 The string corresponding to key has a suffix.
 
LCQuery< T > WhereContains (string key, string subString)
 The string corresponding to key has a subString.
 
LCQuery< T > WhereMatches (string key, string regex, string modifiers=null)
 Matches the regexp.
 
LCQuery< T > WhereMatchesQuery< K > (string key, LCQuery< K > query)
 The value of key must match query.
 
LCQuery< T > WhereDoesNotMatchQuery< K > (string key, LCQuery< K > query)
 The value of key must not match query.
 
LCQuery< T > OrderByAscending (string key)
 Sorts the results in ascending order by the given key.
 
LCQuery< T > OrderByDescending (string key)
 Sorts the results in descending order by the given key.
 
LCQuery< T > AddAscendingOrder (string key)
 Also sorts the results in ascending order by the given key.
 
LCQuery< T > AddDescendingOrder (string key)
 Also sorts the results in descending order by the given key.
 
LCQuery< T > Include (string key)
 Includes nested LCObject for the provided key.
 
LCQuery< T > Select (string key)
 Restricts the keys of the LCObject returned.
 
LCQuery< T > Skip (int value)
 Sets the amount of results to skip before returning any results.
 
LCQuery< T > Limit (int value)
 Sets the limit of the number of results to return.
 
async Task< int > Count ()
 Counts the number of objects that match this query.
 
async Task< T > Get (string objectId)
 Constructs a LCObject whose id is already known by fetching data from the cloud.
 
async Task< ReadOnlyCollection< T > > Find ()
 Retrieves a list of LCObjects that satisfy the query from Server.
 
async Task< T > First ()
 Retrieves at most one LCObject that satisfies this query.
 

Static Public Member Functions

static LCQuery< T > And (IEnumerable< LCQuery< T > > queries)
 Constructs a query that is the and of the given queries.
 
static LCQuery< T > Or (IEnumerable< LCQuery< T > > queries)
 Constructs a query that is the or of the given queries.
 

Properties

string ClassName [get, set]
 The classname of this query.
 
string Endpoint [get]
 
LCCompositionalCondition Condition [get, set]
 
bool IncludeACL [get, set]
 Includes the ALC or not.
 

Detailed Description

The LCQuery class defines a query that is used to fetch LCObjects.

A query to fetch LCObject.

Template Parameters
T
Type Constraints
T :LCObject 

Constructor & Destructor Documentation

◆ LCQuery() [1/3]

LeanCloud.Storage.LCQuery< T >.LCQuery ( string  className,
string  endpoint 
)
inline

Constructs a LCQuery for class.

Parameters
className

◆ LCQuery() [2/3]

LeanCloud.Storage.LCQuery< T >.LCQuery ( string  className)
inline

◆ LCQuery() [3/3]

LeanCloud.Storage.LCQuery< T >.LCQuery ( string  className,
string  endpoint 
)
inline

Member Function Documentation

◆ AddAscendingOrder()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.AddAscendingOrder ( string  key)
inline

Also sorts the results in ascending order by the given key.

Parameters
key
Returns

◆ AddDescendingOrder()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.AddDescendingOrder ( string  key)
inline

Also sorts the results in descending order by the given key.

Parameters
key
Returns

◆ And()

static LCQuery< T > LeanCloud.Storage.LCQuery< T >.And ( IEnumerable< LCQuery< T > >  queries)
inlinestatic

Constructs a query that is the and of the given queries.

Parameters
queries
Returns

◆ Count()

async Task< int > LeanCloud.Storage.LCQuery< T >.Count ( )
inline

Counts the number of objects that match this query.

Returns

◆ Find()

async Task< ReadOnlyCollection< T > > LeanCloud.Storage.LCQuery< T >.Find ( )
inline

Retrieves a list of LCObjects that satisfy the query from Server.

Returns

◆ First()

async Task< T > LeanCloud.Storage.LCQuery< T >.First ( )
inline

Retrieves at most one LCObject that satisfies this query.

Returns

◆ Get()

async Task< T > LeanCloud.Storage.LCQuery< T >.Get ( string  objectId)
inline

Constructs a LCObject whose id is already known by fetching data from the cloud.

Parameters
objectId
Returns

◆ Include()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.Include ( string  key)
inline

Includes nested LCObject for the provided key.

Parameters
key
Returns

◆ Limit()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.Limit ( int  value)
inline

Sets the limit of the number of results to return.

Parameters
value
Returns

◆ Or()

static LCQuery< T > LeanCloud.Storage.LCQuery< T >.Or ( IEnumerable< LCQuery< T > >  queries)
inlinestatic

Constructs a query that is the or of the given queries.

Parameters
queries
Returns

◆ OrderByAscending()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.OrderByAscending ( string  key)
inline

Sorts the results in ascending order by the given key.

Parameters
key
Returns

◆ OrderByDescending()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.OrderByDescending ( string  key)
inline

Sorts the results in descending order by the given key.

Parameters
key
Returns

◆ Select()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.Select ( string  key)
inline

Restricts the keys of the LCObject returned.

Parameters
key
Returns

◆ Skip()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.Skip ( int  value)
inline

Sets the amount of results to skip before returning any results.

Parameters
value
Returns

◆ WhereContainedIn()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereContainedIn ( string  key,
IEnumerable  values 
)
inline

Values contains value corresponding to key, or values contains at least one element in the array corresponding to key.

Parameters
key
values
Returns

◆ WhereContains()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereContains ( string  key,
string  subString 
)
inline

The string corresponding to key has a subString.

Parameters
key
subString
Returns

◆ WhereContainsAll()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereContainsAll ( string  key,
IEnumerable  values 
)
inline

The array corresponding to key contains all elements in values.

Parameters
key
values
Returns

◆ WhereDoesNotExist()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereDoesNotExist ( string  key)
inline

The attribute corresponding to key does not exist.

Parameters
key
Returns

◆ WhereDoesNotMatchQuery< K >()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereDoesNotMatchQuery< K > ( string  key,
LCQuery< K >  query 
)
inline

The value of key must not match query.

Template Parameters
K
Parameters
key
query
Returns
Type Constraints
K :LCObject 

◆ WhereEndsWith()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereEndsWith ( string  key,
string  suffix 
)
inline

The string corresponding to key has a suffix.

Parameters
key
suffix
Returns

◆ WhereEqualTo()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereEqualTo ( string  key,
object  value 
)
inline

The value corresponding to key is equal to value, or the array corresponding to key contains value.

Parameters
key
value
Returns

◆ WhereExists()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereExists ( string  key)
inline

The attribute corresponding to key exists.

Parameters
key
Returns

◆ WhereGreaterThan()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereGreaterThan ( string  key,
object  value 
)
inline

The value corresponding to key is greater than value.

Parameters
key
value
Returns

◆ WhereGreaterThanOrEqualTo()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereGreaterThanOrEqualTo ( string  key,
object  value 
)
inline

The value corresponding to key is greater than or equal to value.

Parameters
key
value
Returns

◆ WhereLessThan()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereLessThan ( string  key,
object  value 
)
inline

The value corresponding to key is less than value.

Parameters
key
value
Returns

◆ WhereLessThanOrEqualTo()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereLessThanOrEqualTo ( string  key,
object  value 
)
inline

The value corresponding to key is less than or equal to value.

Parameters
key
value
Returns

◆ WhereMatches()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereMatches ( string  key,
string  regex,
string  modifiers = null 
)
inline

Matches the regexp.

Parameters
key
regex
modifiers
Returns

◆ WhereMatchesQuery< K >()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereMatchesQuery< K > ( string  key,
LCQuery< K >  query 
)
inline

The value of key must match query.

Parameters
key
query
Returns
Type Constraints
K :LCObject 

◆ WhereNear()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereNear ( string  key,
LCGeoPoint  point 
)
inline

The value corresponding to key is near the point.

Parameters
key
point
Returns

◆ WhereNotContainedIn()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereNotContainedIn ( string  key,
IEnumerable  values 
)
inline

The value of key must not be contained in values.

Parameters
key
values
Returns

◆ WhereNotEqualTo()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereNotEqualTo ( string  key,
object  value 
)
inline

The value corresponding to key is not equal to value, or the array corresponding to key does not contain value.

Parameters
key
value
Returns

◆ WhereRelatedTo()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereRelatedTo ( LCObject  parent,
string  key 
)
inline

The value corresponding to key is related to the parent.

Parameters
parent
key
Returns

◆ WhereSizeEqualTo()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereSizeEqualTo ( string  key,
int  size 
)
inline

The size of the array corresponding to key is equal to size.

Parameters
key
size
Returns

◆ WhereStartsWith()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereStartsWith ( string  key,
string  prefix 
)
inline

The string corresponding to key has a prefix.

Parameters
key
prefix
Returns

◆ WhereWithinGeoBox()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereWithinGeoBox ( string  key,
LCGeoPoint  southwest,
LCGeoPoint  northeast 
)
inline

The value corresponding to key is in the given rectangular geographic bounding box.

Parameters
key
southwest
northeast
Returns

◆ WhereWithinKilometers()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereWithinKilometers ( string  key,
LCGeoPoint  point,
double  maxDistance 
)
inline

◆ WhereWithinMiles()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereWithinMiles ( string  key,
LCGeoPoint  point,
double  maxDistance 
)
inline

◆ WhereWithinRadians()

LCQuery< T > LeanCloud.Storage.LCQuery< T >.WhereWithinRadians ( string  key,
LCGeoPoint  point,
double  maxDistance 
)
inline

Property Documentation

◆ ClassName

string LeanCloud.Storage.LCQuery< T >.ClassName
getset

The classname of this query.

◆ Condition

LCCompositionalCondition LeanCloud.Storage.LCQuery< T >.Condition
getset

◆ Endpoint

string LeanCloud.Storage.LCQuery< T >.Endpoint
get

◆ IncludeACL

bool LeanCloud.Storage.LCQuery< T >.IncludeACL
getset

Includes the ALC or not.


The documentation for this class was generated from the following file: