Chênh lệch

Mô tả

Bỏ qua N tài liệu đầu vào đầu tiên.

Ví dụ

Node.js
const results = await db.pipeline()
  .collection("cities")
  .offset(10)
  .execute();

Web

const results = await execute(db.pipeline()
  .collection("cities")
  .offset(10));
Swift
let results = try await db.pipeline()
  .collection("cities")
  .offset(10)
  .execute()

Kotlin

val results = db.pipeline()
    .collection("cities")
    .offset(10)
    .execute()

Java

Task<Pipeline.Snapshot> results = db.pipeline()
        .collection("cities")
        .offset(10)
        .execute();
Python
results = client.pipeline().collection("cities").offset(10).execute()
Java
Pipeline.Snapshot results =
    firestore.pipeline().collection("cities").offset(10).execute().get();
Bắt đầu
snapshot := client.Pipeline().Collection("cities").Offset(10).Execute(ctx)

Hành vi

Giai đoạn offset(...) sẽ bỏ qua N tài liệu đầu vào đầu tiên. Trừ phi sử dụng giai đoạn sort(...) trước độ lệch, thứ tự trả về tài liệu sẽ không ổn định và việc thực thi lặp lại có thể tạo ra kết quả khác nhau.