@@ -61,6 +61,8 @@ enum class QueryFn {
6161 " Lcom/google/firebase/firestore/Query$Direction;)" \
6262 " Lcom/google/firebase/firestore/Query;" ), \
6363 X (Limit, " limit" , " (J)Lcom/google/firebase/firestore/Query;" ), \
64+ X (LimitToLast, " limitToLast" , \
65+ " (J)Lcom/google/firebase/firestore/Query;" ), \
6466 X (StartAtSnapshot, " startAt" , \
6567 " (Lcom/google/firebase/firestore/DocumentSnapshot;)" \
6668 " Lcom/google/firebase/firestore/Query;" ), \
@@ -235,15 +237,26 @@ class QueryInternal : public WrapperFuture<QueryFn, QueryFn::kCount> {
235237 Query OrderBy (const FieldPath& field, Query::Direction direction);
236238
237239 /* *
238- * @brief Creates and returns a new Query that's additionally limited to only
239- * return up to the specified number of documents .
240+ * @brief Creates and returns a new Query that only returns the first matching
241+ * documents up to the specified number.
240242 *
241243 * @param[in] limit A non-negative integer to specify the maximum number of
242244 * items to return.
243245 *
244246 * @return The created Query.
245247 */
246- Query Limit (int32_t limit);
248+ virtual Query Limit (int32_t limit);
249+
250+ /* *
251+ * @brief Creates and returns a new Query that only returns the last matching
252+ * documents up to the specified number.
253+ *
254+ * @param[in] limit A non-negative integer to specify the maximum number of
255+ * items to return.
256+ *
257+ * @return The created Query.
258+ */
259+ virtual Query LimitToLast (int32_t limit);
247260
248261 /* *
249262 * @brief Creates and returns a new Query that starts at the provided document
0 commit comments