From fa263a4f6c23dd03ceb1bd7f92251c564ee9ec17 Mon Sep 17 00:00:00 2001 From: afghanistanyn Date: Thu, 18 Aug 2022 10:58:53 +0800 Subject: [PATCH] fix https://github.com/hhyo/Archery/issues/1722 --- sql/engines/mongo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sql/engines/mongo.py b/sql/engines/mongo.py index e198624537..d1733b071b 100644 --- a/sql/engines/mongo.py +++ b/sql/engines/mongo.py @@ -949,7 +949,10 @@ def query(self, db_name=None, sql="", limit_num=0, close_conn=True, **kwargs): if "limit" in query_dict and query_dict["limit"]: query_limit = int(query_dict["limit"]) limit = min(limit_num, query_limit) if query_limit else limit_num - find_cmd += ".limit(limit)" + find_cmd += f".limit({limit})" + if "skip" in query_dict and query_dict["skip"]: + query_skip = int(query_dict["skip"]) + find_cmd += f".skip({query_skip})" if "count" in query_dict: find_cmd += ".count()" if "explain" in query_dict: