endAt method Null safety

void endAt(
  1. Map<String, dynamic> dataEntry
)

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.

To ensure the query performance of endAt(), you need to create the index required by the Cloud DB before calling this method to construct the query condition. If no index is created, you may receive an exception message. You need to create the missing index based on the exception message.

Implementation

void endAt(Map<String, dynamic> dataEntry) {
  if (dataEntry.isEmpty) {
    throw FormatException('dataEntry cannot be empty.', dataEntry);
  }
  _queryElements.add(
    <String, dynamic>{
      _QueryConstants.OPERATION: _QueryConstants.END_AT,
      _QueryConstants.ZONE_OBJECT_DATA_ENTRY: dataEntry,
    },
  );
}