AGConnectCloudDBQuery class

These methods are called as range query:

  • startAt()
  • startAfter()
  • endAt()
  • endBefore()

In a query, only one of the range query method can be used and can be called only once.

When constructing query conditions, range query method can be used independently or used together with the equalTo(), orderBy(), or limit() method.

The combination of range query methods and the equalTo(), or orderBy() method must be performed after the equalTo(), or orderBy() method and before limit().

  • If range query method is not used with orderBy(), data records are sorted in ascending order of the primary key by default, and data records after the specified start position are returned.
  • When range query method is used together with equalTo(), the query field specified by equalTo() cannot be a primary key field.
  • When range query method is used together with orderBy(), only one of them can be used (ascending or descending). The value of the field specified by orderBy() cannot be empty.
  • When range query method is used together with equalTo() and orderBy() either ascending or descending, the field specified by equalTo() cannot be the same as that by orderBy().

Constructors

AGConnectCloudDBQuery(String objectTypeName)

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
query Map<String, dynamic>
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

beginsWith(String field, String value) → void
You 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. [...]
contains(String field, String value) → void
You can invoke this method to add a query condition in which the value of a field in an entity class contains a specified substring. [...]
endAt(Map<String, dynamic> dataEntry) → void
This method is used to set the end position of the data to be queried, and return to the data records with the corresponding records at the end position included. [...]
endBefore(Map<String, dynamic> dataEntry) → void
This method is used to set the end position of the data to be queried, and return to the data records with the corresponding records at the end position not included. [...]
endsWith(String field, String value) → void
You 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. [...]
equalTo(String field, dynamic value) → void
You 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. [...]
greaterThan(String field, dynamic value) → void
You 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. [...]
greaterThanOrEqualTo(String field, dynamic value) → void
You 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. [...]
isNotNull(String field) → void
You can invoke this method to add a query condition in which a field in an entity class is not null.
isNull(String field) → void
You can invoke this method to add a query condition in which a field in an entity class is null.
lessThan(String field, dynamic value) → void
You 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. [...]
lessThanOrEqualTo(String field, dynamic value) → void
You 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 the specified value. [...]
limit(int count, {int offset}) → void
You can invoke this method to add query conditions to specify the number of data records in the returned query result set. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
notEqualTo(String field, dynamic value) → void
You 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. [...]
orderBy(String field, {bool ascending = true}) → void
You can call this method to sort query results by a specified field. You are advised to call this method after all the other methods. [...]
startAfter(Map<String, dynamic> dataEntry) → void
This method is used to set the start position of the data to be queried, and return to the data records with the corresponding records at the start position not included. [...]
startAt(Map<String, dynamic> dataEntry) → void
This method is used to set the start position of the data to be queried, and return to the data records with the corresponding records at the start position included. [...]
toString() String
A string representation of this object. [...]
inherited
whereIn(String field, List value) → void
You 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. [...]

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited