From 381cc730e1f13bbf9b1d2d685dda0440afa2ccdc Mon Sep 17 00:00:00 2001 From: liunux4odoo <41217877+liunux4odoo@users.noreply.github.com> Date: Tue, 7 May 2024 08:58:22 +0800 Subject: [PATCH] add `include_rank` parameter to `Table.search` --- sqlite_utils/db.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sqlite_utils/db.py b/sqlite_utils/db.py index 6332dc2..27099d0 100644 --- a/sqlite_utils/db.py +++ b/sqlite_utils/db.py @@ -2641,6 +2641,7 @@ class Table(Queryable): offset: Optional[int] = None, where: Optional[str] = None, where_args: Optional[Union[Iterable, dict]] = None, + include_rank: bool = False, quote: bool = False, ) -> Generator[dict, None, None]: """ @@ -2654,6 +2655,7 @@ class Table(Queryable): :param offset: Optional integer SQL offset. :param where: Extra SQL fragment for the WHERE clause :param where_args: Arguments to use for :param placeholders in the extra WHERE clause + :param include_rank: Select the search rank column in the final query :param quote: Apply quoting to disable any special characters in the search query See :ref:`python_api_fts_search`. @@ -2673,6 +2675,7 @@ class Table(Queryable): limit=limit, offset=offset, where=where, + include_rank=include_rank, ), args, )