Skip to content

Commit

Permalink
Version bumped to 0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
xzkostyan committed Sep 20, 2019
1 parent 41f3950 commit 8463794
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 3 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [0.1.1] - 2019-09-20
### Added
- `Client.from_url` method that creates client configured from the given URL.

### Fixed
- If source column was timezone-aware values from DateTime column are returned with timezone now.
- Handling zero bytes in the middle of FixedString column. Issue [#104](https://github.com/mymarilyn/clickhouse-driver/issues/104).

## [0.1.0] - 2019-08-07
### Added
- SimpleAggregateFunction type. Pull request [#95](https://github.com/mymarilyn/clickhouse-driver/pull/95) by [azat](https://github.com/azat).
Expand Down Expand Up @@ -207,7 +215,8 @@
- Date/DateTime types.
- String types.

[Unreleased]: https://github.com/mymarilyn/clickhouse-driver/compare/0.1.0...HEAD
[Unreleased]: https://github.com/mymarilyn/clickhouse-driver/compare/0.1.1...HEAD
[0.1.1]: https://github.com/mymarilyn/clickhouse-driver/compare/0.1.1...0.1.1
[0.1.0]: https://github.com/mymarilyn/clickhouse-driver/compare/0.0.20...0.1.0
[0.0.20]: https://github.com/mymarilyn/clickhouse-driver/compare/0.0.19...0.0.20
[0.0.19]: https://github.com/mymarilyn/clickhouse-driver/compare/0.0.18...0.0.19
Expand Down
2 changes: 1 addition & 1 deletion clickhouse_driver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from .client import Client


VERSION = (0, 1, 0)
VERSION = (0, 1, 1)
__version__ = '.'.join(str(x) for x in VERSION)

__all__ = ['Client']
4 changes: 3 additions & 1 deletion clickhouse_driver/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ class Connection(object):
Represents connection between client and ClickHouse server.
:param host: host with running ClickHouse server.
:param port: port ClickHouse server is bound to. Defaults to ``9000``.
:param port: port ClickHouse server is bound to.
Defaults to ``9000`` if connection is not secured and
to ``9440`` if connection is secured.
:param database: database connect to. Defaults to ``'default'``.
:param user: database user. Defaults to ``'default'``.
:param password: user's password. Defaults to ``''`` (no password).
Expand Down
36 changes: 36 additions & 0 deletions docs/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -245,3 +245,39 @@ Query logs can be received from server by using `send_logs_level` setting:
2018-12-14 10:24:53,875 INFO clickhouse_driver.log: {b328ad33-60e8-4012-b4cc-97f44a7b28f2} [ 25 ] <Information> executeQuery: Read 1 rows, 1.00 B in 0.004 sec., 262 rows/sec., 262.32 B/sec.
2018-12-14 10:24:53,875 INFO clickhouse_driver.log: {b328ad33-60e8-4012-b4cc-97f44a7b28f2} [ 25 ] <Debug> MemoryTracker: Peak memory usage (for query): 40.23 KiB.
[(1,)]
Client configuring from URL
---------------------------

*New in version 0.1.1.*

Client can be configured from the given URL:

.. code-block:: python
>>> from clickhouse_driver import Client
>>> client = Client.from_url(
... 'clickhouse://login:password@host:port/database'
... )
Port 9000 is default for schema ``clickhouse``, port 9440 is default for schema ``clickhouses``.

Connection to default database:

.. code-block:: python
>>> client = Client.from_url('clickhouse://localhost')
Querystring arguments will be passed along to the :meth:`~clickhouse_driver.connection.Connection` class’s initializer:

.. code-block:: python
>>> client = Client.from_url(
... 'clickhouse://localhost/database?send_logs_level=trace&'
... 'client_name=myclient&'
... 'compression=lz4'
... )
If parameter doesn't match Connection's init signature will be treated as settings parameter.

0 comments on commit 8463794

Please sign in to comment.