File tree 2 files changed +14
-0
lines changed 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -572,6 +572,16 @@ def order_where_limit():
572
572
print (results )
573
573
574
574
575
+ def order_limit_to_last ():
576
+ db = firestore .Client ()
577
+ # [START fs_order_by_name_limit_query]
578
+ cities_ref = db .collection ("cities" )
579
+ query = cities_ref .order_by ("name" ).limit_to_last (2 )
580
+ results = query .get ()
581
+ # [END fs_order_by_name_limit_query]
582
+ print (results )
583
+
584
+
575
585
def order_where_valid ():
576
586
db = firestore .Client ()
577
587
# [START order_where_valid]
Original file line number Diff line number Diff line change @@ -235,6 +235,10 @@ def test_order_where_limit():
235
235
snippets .order_where_limit ()
236
236
237
237
238
+ def test_order_limit_to_last ():
239
+ snippets .order_limit_to_last ()
240
+
241
+
238
242
def test_order_where_invalid ():
239
243
snippets .order_where_invalid ()
240
244
You can’t perform that action at this time.
0 commit comments