Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AGCCloudDBZoneQuery

en

This class provides various predicates such as where(), equalTo(), notEqualTo(), and in() to construct query conditions. Developers can construct their own AGCCloudDBZoneQuery objects based on the preceding predicate query methods and input the objects as parameters of the query()、queryAverageQuery()、queryUnsynced() and delete() methods. Then, Cloud DB will obtain the corresponding object data from Cloud DB zone based on the specified query conditions and return the query results.

zh

提供了诸如 where()、equalTo()、notEqualTo()、in() 等丰富的谓词查询来构造查询条件。开发者可以基于上述谓词查询方法构造自己的 AGCCloudDBZoneQuery 对象,并作为 query()、queryAverageQuery()、queryUnsynced() 和 delete() 等方法的参数传入,Cloud DB 会基于指定的查询条件从 Cloud DB zone中获取到对应的对象数据并返回查询结果。

Hierarchy

Index

Constructors

Private constructor

Properties

Private cls_ServiceAGCCloudDB

cls_ServiceAGCCloudDB: string = "org/cocos2dx/javascript/service/db/CloudDBZoneQueryHelper"

queryId

queryId: string

Methods

beginsWith

  • en

    Developers can invoke this method to add a query condition in which the value of a field of the string or text type in an entity class starts with a specified substring.

    zh

    开发者调用此方法来添加实体类中某个字符串类型的字段值以指定子串开头的查询条件。

    Parameters

    • fieldName: string

      Name of a field in an entity class.

    • value: string

      Value of the specified substring corresponding to the selected field.

    Returns AGCCloudDBZoneQuery

contains

  • en

    Developers can invoke this method to add a query condition in which the value of a field in an entity class contains a specified substring.

    zh

    开发者调用此方法来添加实体类中某个字符串类型的字段值包含指定子串的查询条件。

    Parameters

    • fieldName: string

      Name of a field in an entity class.

    • value: string

      Value of the specified substring corresponding to the selected field.

    Returns AGCCloudDBZoneQuery

endsWith

  • en

    Developers can invoke this method to add a query condition in which the value of a field of the string or text type in an entity class ends with a specified substring.

    zh

    开发者调用此方法来添加实体类中某个字符串类型的字段值以指定子串结尾的查询条件。

    Parameters

    • fieldName: string

      Name of a field in an entity class.

    • value: string

      Value of the specified substring corresponding to the selected field.

    Returns AGCCloudDBZoneQuery

equalTo

  • en

    Developers can invoke this method to add a query condition in which the value of a field in an entity class is equal to the specified value.

    zh

    开发者调用此方法来添加实体类中某个字段的值等于指定值的查询条件。

    Parameters

    • fieldName: string

      Name of a field in an entity class.

    • value: boolean | number | string | Date

      Specified value of the selected field.

    Returns AGCCloudDBZoneQuery

greaterThan

  • en

    Developers can invoke this method to add a query condition in which the value of a field in an entity class is greater than the specified value.

    zh

    开发者调用此方法来添加实体类中某个字段的值大于指定值的查询条件。

    Parameters

    • fieldName: string

      Name of a field in an entity class.

    • value: boolean | number | string | Date

      Specified value of the selected field.

    Returns AGCCloudDBZoneQuery

greaterThanOrEqualTo

  • greaterThanOrEqualTo(fieldName: string, value: boolean | number | string | Date): AGCCloudDBZoneQuery
  • en

    Developers can invoke this method to add a query condition in which the value of a field in an entity class is greater than or equal to the specified value.

    zh

    开发者调用此方法来添加实体类中某个字段的值大于等于指定值的查询条件。

    Parameters

    • fieldName: string

      Name of a field in an entity class.

    • value: boolean | number | string | Date

      Specified value of the selected field.

    Returns AGCCloudDBZoneQuery

in

  • en

    Developers can invoke this method to add a query condition in which the value of a field in an entity class is included in a specified array.

    zh

    开发者调用此方法来添加实体类中某个字段的值被指定数组所包含的查询条件。

    Parameters

    • fieldName: string

      Name of a field in an entity class.

    • values: boolean[] | number[] | string[] | Date[]

    Returns AGCCloudDBZoneQuery

isNotNull

  • en

    Developers can invoke this method to add a query condition in which a field in an entity class is not null.

    zh

    开发者调用此方法来添加实体类中某个字段的值不为空的查询条件。

    Parameters

    • fieldName: string

      Name of a field in an entity class.

    Returns AGCCloudDBZoneQuery

isNull

  • en

    Developers can invoke this method to add a query condition in which a field in an entity class is null.

    zh

    开发者调用此方法来添加实体类中某个字段的值为空的查询条件。

    Parameters

    • fieldName: string

      Name of a field in an entity class.

    Returns AGCCloudDBZoneQuery

lessThan

  • en

    Developers can invoke this method to add a query condition in which the value of a field in an entity class is less than the specified value.

    zh

    开发者调用此方法来添加实体类中某个字段的值小于指定值的查询条件。

    Parameters

    • fieldName: string

      Name of a field in an entity class.

    • value: boolean | number | string | Date

      Specified value of the selected field.

    Returns AGCCloudDBZoneQuery

lessThanOrEqualTo

  • lessThanOrEqualTo(fieldName: string, value: boolean | number | string | Date): AGCCloudDBZoneQuery
  • en

    Developers can invoke this method to add a query condition in which the value of a field in an entity class is less than or equal to a specified value.

    zh

    开发者调用此方法来添加实体类中某个字段的值小于或等于指定值的查询条件。

    Parameters

    • fieldName: string

      Name of a field in an entity class.

    • value: boolean | number | string | Date

      Specified value of the selected field.

    Returns AGCCloudDBZoneQuery

limit

  • en

    Developers can invoke this method to add query conditions to specify the number of data records in the returned query result set. If you do not set offset, the first count objects are obtained by default. If the number of objects in the query result set is less than count, all objects are returned. If offset is set, the first count objects starting from the offset position are returned. If the number of objects starting from the offset position is less than the count value, all object data starting from the offset position is returned.

    zh

    开发者调用此方法添加查询条件,用于限定返回查询结果集中的数据数量。 如设置 offset,则返回从 offset 位置开始的 count 个对象数据。如果从 offset 位置开始后的对象数目小于 count 个,则全量返回从 offset 位置开始后的对象数据。 如无需设置 offset,则默认从首个对象开始获取前 count 个对象数据。如果查询结果集中的对象数目小于 count 个,则全量返回对象数据。

    Parameters

    • count: number

      Maximum number of data records that can be obtained.

    • offset: number

      Specifies the start position of data records. You can specify whether to set the offset position based on the actual requirements.

    Returns AGCCloudDBZoneQuery

notEqualTo

  • en

    Developers can invoke this method to add a query condition in which the value of a field in an entity class is not equal to the specified value.

    zh

    开发者调用此方法来添加实体类中某个字段的值不等于指定值的查询条件。

    Parameters

    • fieldName: string

      Name of a field in an entity class.

    • value: boolean | number | string | Date

      Specified value of the selected field.

    Returns AGCCloudDBZoneQuery

orderByAsc

  • en

    Developers can invoke this method to sort query results by a specified field in ascending order. This method must be used before limit() and after equalTo(), notEqualTo(), greaterThan(), greaterThanOrEqualTo(), lessThan(), lessThanOrEqualTo(), in(), beginsWith(), endsWith(), contains(), isNull(), and isNotNull().

    zh

    开发者调用此方法来设置查询结果按指定字段升序排列。本方法必须在 equalTo()notEqualTo()greaterThan()greaterThanOrEqualTo()lessThan()lessThanOrEqualTo()in()beginsWith()endsWith()contains()isNull()isNotNull() 之后,limit() 之前调用。

    Parameters

    • fieldName: string

      Name of a field in an entity class.

    Returns AGCCloudDBZoneQuery

orderByDesc

  • en

    Developers can invoke this method to sort query results by a specified field in descending order. This method must be used before limit() and after equalTo(), notEqualTo(), greaterThan(), greaterThanOrEqualTo(), lessThan(), lessThanOrEqualTo(), in(), beginsWith(), endsWith(), contains(), isNull(), and isNotNull().

    zh

    开发者调用此方法来设置查询结果按指定字段降序排列。本方法必须在 equalTo()notEqualTo()greaterThan()greaterThanOrEqualTo()lessThan()lessThanOrEqualTo()in()beginsWith()endsWith()contains()isNull()isNotNull() 之后,limit() 之前调用。

    Parameters

    • fieldName: string

      Name of a field in an entity class.

    Returns AGCCloudDBZoneQuery

Static callStaticMethod

  • callStaticMethod(...args: (string | number | false | true)[]): any

Static where

  • en

    Developers can invoke this method to obtain a AGCCloudDBZoneQuery object and specify the object type to be queried in Cloud DB zone. The AGCCloudDBZoneQuery object does not provide any construction method. You can obtain an object type instance only by using the where method. Before invoking any methods, you must invoke where() to obtain the CloudDBZoneQuery instance.

    zh

    开发者调用此方法来获取一个 AGCCloudDBZoneQuery 对象,并指定 Cloud DB zone 中查询的对象类型。AGCCloudDBZoneQuery 对象不提供任何构造方法,只能通过 where 方法获取一个对象类型实例。 开发者调用任何方法之前必须先调用 where() 获取 AGCCloudDBZoneQuery 实例。

    Parameters

    • objectTypeName: string

      Name of a field in an entity class type.

    • Default value queryId: string = ""

      Custom query ID for query interface.

    Returns AGCCloudDBZoneQuery

Generated using TypeDoc