kopia lustrzana https://github.com/simonw/datasette
rodzic
335f26a0f7
commit
1f55a4a2b6
|
@ -4,13 +4,20 @@
|
|||
Changelog
|
||||
=========
|
||||
|
||||
.. _v0_45a2:
|
||||
.. _v0_45a3:
|
||||
|
||||
0.45a2 (2020-06-23)
|
||||
0.45a3 (2020-06-27)
|
||||
-------------------
|
||||
|
||||
.. warning:: This is an **alpha** release. See :ref:`contributing_alpha_beta`.
|
||||
|
||||
- Canned queries now support :ref:`canned_queries_magic_parameters`, which can be used to insert or select automatically generated values. For example::
|
||||
|
||||
insert into logs
|
||||
(user_id, timestamp)
|
||||
values
|
||||
(:_actor_id, :_timestamp_datetime_utc)
|
||||
This inserts the currently authenticated actor ID and the current datetime. (`#842 <https://github.com/simonw/datasette/issues/842>`__)
|
||||
- New :ref:`plugin_hook_startup` plugin hook. (`#834 <https://github.com/simonw/datasette/issues/834>`__)
|
||||
- New :ref:`plugin_hook_canned_queries` plugin hook. See `datasette-saved-queries <https://github.com/simonw/datasette-saved-queries>`__ for an example of this hook in action. (`#852 <https://github.com/simonw/datasette/issues/852>`__)
|
||||
- Workaround for "Too many open files" error in test runs. (`#846 <https://github.com/simonw/datasette/issues/846>`__)
|
||||
|
|
|
@ -461,7 +461,7 @@ METADATA = {
|
|||
"queries": {
|
||||
"𝐜𝐢𝐭𝐢𝐞𝐬": "select id, name from facet_cities order by id limit 1;",
|
||||
"pragma_cache_size": "PRAGMA cache_size;",
|
||||
"magic_parameters": "select :_header_user_agent as user_agent, :_date_datetime_utc as datetime",
|
||||
"magic_parameters": "select :_header_user_agent as user_agent, :_timestamp_datetime_utc as datetime",
|
||||
"neighborhood_search": {
|
||||
"sql": textwrap.dedent(
|
||||
"""
|
||||
|
|
|
@ -97,9 +97,9 @@ def test_database_page(app_client):
|
|||
),
|
||||
("/fixtures/from_async_hook", "from_async_hook"),
|
||||
("/fixtures/from_hook", "from_hook"),
|
||||
("/fixtures/magic_parameters", "magic_parameters"),
|
||||
("/fixtures/neighborhood_search#fragment-goes-here", "Search neighborhoods"),
|
||||
("/fixtures/pragma_cache_size", "pragma_cache_size"),
|
||||
("/fixtures/magic_parameters", "magic_parameters"),
|
||||
] == sorted(
|
||||
[(a["href"], a.text) for a in queries_ul.find_all("a")], key=lambda p: p[0]
|
||||
)
|
||||
|
|
Ładowanie…
Reference in New Issue