From 4cc82fd0bccc9d2eeb3510beb4e691d7da099f84 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sun, 3 Jan 2021 13:15:26 -0800 Subject: [PATCH] Release 3.2 Refs #206, #211, #212, #213, #214, #215, #216, #217, #218, #219 --- docs/changelog.rst | 18 ++++++++++++++++++ setup.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 8388066..cf0ff85 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -2,6 +2,24 @@ Changelog =========== +.. _v3_2: + +3.2 (2021-01-03) +---------------- + +This release introduces a new mechanism for speeding up ``count(*)`` queries using cached table counts, stored in a ``_counts`` table and updated by triggers. This mechanism is described in :ref:`python_api_cached_table_counts`, and can be enabled using Python API methods or the new ``enable-counts`` CLI command. (`#212 `__) + +- ``table.enable_counts()`` method for enabling these triggers on a specific table. +- ``db.enable_counts()`` method for enabling triggers on every table in the database. (`#213 `__) +- New ``sqlite-utils enable-counts my.db`` command for enabling counts on all or specific tables, see :ref:`cli_enable_counts`. (`#214 `__) +- New ``sqlite-utils triggers`` command for listing the triggers defined for a database or specific tables, see :ref:`cli_triggers`. (`#218 `__) +- New ``db.use_counts_table`` property which, if ``True``, causes ``table.count`` to read from the ``_counts`` table. (`#215 `__) +- ``table.has_counts_triggers`` property revealing if a table has been configured with the new ``_counts`` database triggers. +- ``db.reset_counts()`` method and ``sqlite-utils reset-counts`` command for resetting the values in the ``_counts`` table. (`#219 `__) +- The previously undocumented ``db.escape()`` method has been renamed to ``db.quote()`` and is now covered by the documentation: :ref:`python_api_quote`. (`#217 `__) +- New ``table.triggers_dict`` and ``db.triggers_dict`` introspection properties. (`#211 `__, `#216 `__) +- ``sqlite-utils insert`` now shows a more useful error message for invalid JSON. (`#206 `__) + .. _v3_1_1: 3.1.1 (2021-01-01) diff --git a/setup.py b/setup.py index af257d8..d3f141c 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages import io import os -VERSION = "3.1.1" +VERSION = "3.2" def get_long_description():