Skip to content

Commit

Permalink
Version 0.2.7 release
Browse files Browse the repository at this point in the history
  • Loading branch information
xzkostyan committed Feb 19, 2024
1 parent c183ae1 commit df534e2
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
25 changes: 23 additions & 2 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/mymarilyn/clickhouse-driver/issues/376>`_.
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:
Expand Down

0 comments on commit df534e2

Please sign in to comment.