When combining start_{at,after} or end_{at,before} with last_to_limit in a Firestore query, start_at and end_at are not applied properly, returning unexpected results.
Environment details
OS: macOS 14.6.1
Ruby version: 3.3.4
Gem name and version: google-cloud-firestore 2.16.0
Steps to reproduce
Create documents in the data collection with an id field
require "google/cloud/firestore"
firestore = Google::Cloud::Firestore.new
10.times do |i|
doc = firestore.collection("data").doc
doc.set({ id: i })
end
Run the sample code using end_before and limit_to_last
When combining
start_{at,after}
orend_{at,before}
withlast_to_limit
in a Firestore query,start_at
andend_at
are not applied properly, returning unexpected results.Environment details
Steps to reproduce
Create documents in the
data
collection with anid
fieldend_before
andlimit_to_last
Code example
Full backtrace
Expected result
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!