From df534e2d30ba623678e3820f9b9135015cf921eb Mon Sep 17 00:00:00 2001 From: Konstantin Lebedev Date: Sun, 18 Feb 2024 13:34:43 +0300 Subject: [PATCH] Version 0.2.7 release --- CHANGELOG.md | 18 +++++++++++++++++- docs/quickstart.rst | 25 +++++++++++++++++++++++-- 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 273ca3a4..e0a75233 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,24 @@ # Changelog ## Unreleased + +## [0.2.7] - 2024-02-18 +### Added +- Wheels for Python 3.12. +- Toggle hostname verification with ``verify`` option. Solves issue [#378](https://github.com/mymarilyn/clickhouse-driver/issues/378). Pull request [#379](https://github.com/mymarilyn/clickhouse-driver/pull/379) by [adamleko](https://github.com/adamleko). + ### Fixed -- Memory leak when clickhouse raise exception onBufferedSocketWriter.write_into_stream. Solves issue [#406](https://github.com/mymarilyn/clickhouse-driver/issues/406). +- Date32 start interval changed to 1900-01-01. Solves issue [#409](https://github.com/mymarilyn/clickhouse-driver/issues/409). +- Memory leak when clickhouse raise exception on ``BufferedSocketWriter.write_into_stream``. Solves issue [#406](https://github.com/mymarilyn/clickhouse-driver/issues/406). Pull request [#407](https://github.com/mymarilyn/clickhouse-driver/pull/407) by [pulina](https://github.com/pulina). +- ``input_format_null_as_default`` option for UUID produce ``00000000-0000-0000-0000-000000000000`` if set to true. Solves issue [#401](https://github.com/mymarilyn/clickhouse-driver/issues/401). +- [Tests] Remove MemoryTracker asserting on INSERT statements. Solves issue [#403](https://github.com/mymarilyn/clickhouse-driver/issues/403). +- Store "progress" and "profile" stats on INSERT statements. Solves issue [#391](https://github.com/mymarilyn/clickhouse-driver/issues/391). Pull request [#392](https://github.com/mymarilyn/clickhouse-driver/pull/392) by [insomnes](https://github.com/insomnes). +- Add ``send_logs_level=test`` log level support. Solves issue [#383](https://github.com/mymarilyn/clickhouse-driver/issues/383). Pull request [#395](https://github.com/mymarilyn/clickhouse-driver/pull/395) by [the-horhe](https://github.com/the-horhe). +- ``self`` in ``int128_from_quads``, ``int128_to_quads``, ``int256_from_quads``, ``int256_to_quads``. Solves issue [#400](https://github.com/mymarilyn/clickhouse-driver/issues/400). + +### Changed +- Server-side parameters substitution is turned off by default. You can't mix client-side and server-side formatting in one query. Solves issue [#376](https://github.com/mymarilyn/clickhouse-driver/issues/376) and [#410](https://github.com/mymarilyn/clickhouse-driver/issues/410). +- Protocol version bumped to 54462. ## [0.2.6] - 2023-05-02 ### Added diff --git a/docs/quickstart.rst b/docs/quickstart.rst index a0dcb1a6..146e691d 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -70,15 +70,36 @@ NOTE: formatting queries using Python's f-strings or concatenation can lead to S Use ``%(myvar)s`` parameters instead. Server-side parameters supported since 0.2.6 version. - You can mix client-side and server-side formatting in one query: +Since 0.2.7 it's disabled by default to avoid "limit" and "offset" names collision. +See, `issue `_. +You can decide which side parameters should be rendered into placeholders with +``server_side_params``. If it's set to: + + * ``True`` - parameters are rendered on server side; + * ``False``- default, parameters are rendered in driver side. + +``myvar`` will be rendered on server side and the actual query sent to server +will be ``SELECT 'test' like '%%es%%', {myvar:Int32}``: .. code-block:: python >>> client.execute( - ... "SELECT 'test' like '%%es%%', %(myvar)s, {myvar:Int32}", + ... "SELECT 'test' like '%%es%%', {myvar:Int32}", + ... {'myvar': 1}, settings={'server_side_params': True} + ... ) + +``myvar`` will be rendered on driver side and the actual query sent to server +will be ``SELECT 'test' like '%%es%%', 1``: + + .. code-block:: python + + >>> client.execute( + ... "SELECT 'test' like '%%es%%', %(myvar)s, ... {'myvar': 1} ... ) +You can't mix client-side and server-side formatting in one query. + Customisation ``SELECT`` output with ``FORMAT`` clause is not supported. .. _execute-with-progress: