Compare commits

...

4 commits

Author SHA1 Message Date
Simon Willison
611f75d617 Release 0.52.5
Refs #1134
2020-12-09 12:03:44 -08:00
Simon Willison
e48f7f1bfe Fix for combining ?_search_x and ?_searchmode=raw, closes #1134 2020-12-09 12:00:19 -08:00
Simon Willison
b09818e8f3 Fixed spelling of Janary 2020-12-09 12:00:09 -08:00
Simon Willison
d09cac90ea Fixed Markdown indentation of news
To make it easier to programmatically extract.
2020-12-09 12:00:00 -08:00
5 changed files with 56 additions and 40 deletions

View file

@ -69,7 +69,7 @@ Want to stay up-to-date with the project? Subscribe to the [Datasette Weekly new
* Read more about this release here: [Datasette 0.28—and why master should always be releasable](https://simonwillison.net/2019/May/19/datasette-0-28/) * Read more about this release here: [Datasette 0.28—and why master should always be releasable](https://simonwillison.net/2019/May/19/datasette-0-28/)
* 24th February 2019: [ * 24th February 2019: [
sqlite-utils: a Python library and CLI tool for building SQLite databases](https://simonwillison.net/2019/Feb/25/sqlite-utils/) - a partner tool for easily creating SQLite databases for use with Datasette. sqlite-utils: a Python library and CLI tool for building SQLite databases](https://simonwillison.net/2019/Feb/25/sqlite-utils/) - a partner tool for easily creating SQLite databases for use with Datasette.
* 31st Janary 2019: [Datasette 0.27](https://docs.datasette.io/en/stable/changelog.html#v0-27) - `datasette plugins` command, newline-delimited JSON export option, new documentation on [The Datasette Ecosystem](https://docs.datasette.io/en/stable/ecosystem.html). * 31st January 2019: [Datasette 0.27](https://docs.datasette.io/en/stable/changelog.html#v0-27) - `datasette plugins` command, newline-delimited JSON export option, new documentation on [The Datasette Ecosystem](https://docs.datasette.io/en/stable/ecosystem.html).
* 10th January 2019: [Datasette 0.26.1](https://docs.datasette.io/en/stable/changelog.html#v0-26-1) - SQLite upgrade in Docker image, `/-/versions` now shows SQLite compile options. * 10th January 2019: [Datasette 0.26.1](https://docs.datasette.io/en/stable/changelog.html#v0-26-1) - SQLite upgrade in Docker image, `/-/versions` now shows SQLite compile options.
* 2nd January 2019: [Datasette 0.26](https://docs.datasette.io/en/stable/changelog.html#v0-26) - minor bug fixes, `datasette publish now --alias` argument. * 2nd January 2019: [Datasette 0.26](https://docs.datasette.io/en/stable/changelog.html#v0-26) - minor bug fixes, `datasette publish now --alias` argument.
* 18th December 2018: [Fast Autocomplete Search for Your Website](https://24ways.org/2018/fast-autocomplete-search-for-your-website/) - a new tutorial on using Datasette to build a JavaScript autocomplete search engine. * 18th December 2018: [Fast Autocomplete Search for Your Website](https://24ways.org/2018/fast-autocomplete-search-for-your-website/) - a new tutorial on using Datasette to build a JavaScript autocomplete search engine.

View file

@ -1,2 +1,2 @@
__version__ = "0.52.4" __version__ = "0.52.5"
__version_info__ = tuple(__version__.split(".")) __version_info__ = tuple(__version__.split("."))

View file

@ -443,7 +443,9 @@ class TableView(RowTableShared):
fts_table = fts_table or await db.fts_table(table) fts_table = fts_table or await db.fts_table(table)
fts_pk = special_args.get("_fts_pk", table_metadata.get("fts_pk", "rowid")) fts_pk = special_args.get("_fts_pk", table_metadata.get("fts_pk", "rowid"))
search_args = dict( search_args = dict(
pair for pair in special_args.items() if pair[0].startswith("_search") pair
for pair in special_args.items()
if pair[0].startswith("_search") and pair[0] != "_searchmode"
) )
search = "" search = ""
search_mode_raw = special_args.get("_searchmode") == "raw" search_mode_raw = special_args.get("_searchmode") == "raw"

View file

@ -4,6 +4,13 @@
Changelog Changelog
========= =========
.. _v0_52_5:
0.52.5 (2020-12-09)
-------------------
- Fix for error caused by combining the ``_searchmode=raw`` and ``?_search_COLUMN`` parameters. (`#1134 <https://github.com/simonw/datasette/issues/1134>`__)
.. _v0_52_4: .. _v0_52_4:
0.52.4 (2020-12-05) 0.52.4 (2020-12-05)

View file

@ -1035,6 +1035,13 @@ def test_sortable_columns_metadata(app_client):
[2, "terry dog", "sara weasel", "puma"], [2, "terry dog", "sara weasel", "puma"],
], ],
), ),
(
# _searchmode=raw combined with _search_COLUMN
"/fixtures/searchable.json?_search_text2=te*&_searchmode=raw",
[
[1, "barry cat", "terry dog", "panther"],
],
),
( (
"/fixtures/searchable.json?_search=weasel", "/fixtures/searchable.json?_search=weasel",
[[2, "terry dog", "sara weasel", "puma"]], [[2, "terry dog", "sara weasel", "puma"]],