refactor: use db independent offset syntax (#31345)

* chore: use db independent offset syntax

* fix: typo

* style: reformat code to black spec

Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
Conor
2022-06-14 00:19:07 -05:00
committed by GitHub
parent 39338e70d5
commit 00ef499739
19 changed files with 40 additions and 37 deletions

View File

@@ -25,7 +25,7 @@ def query_task(doctype, txt, searchfield, start, page_len, filters):
case when `%s` like %s then 0 else 1 end,
`%s`,
subject
limit %s, %s"""
limit %s offset %s"""
% (searchfield, "%s", "%s", match_conditions, "%s", searchfield, "%s", searchfield, "%s", "%s"),
(search_string, search_string, order_by_string, order_by_string, start, page_len),
(search_string, search_string, order_by_string, order_by_string, page_len, start),
)