Skip to content

Commit 496b326

Browse files
authored
Merge pull request #23 from coingaming/fix/update-ch
fix: 🐛 ch driver compatible with clickhouse 25.4
2 parents 01c0380 + 6f52b2a commit 496b326

23 files changed

Lines changed: 3295 additions & 4 deletions

File tree

.github/workflows/elixir.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
--health-timeout 5s
4848
--health-retries 5
4949
clickhouse:
50-
image: clickhouse/clickhouse-server:24.3.3.102-alpine
50+
image: clickhouse/clickhouse-server:25.4-alpine
5151
ports:
5252
- 8123:8123
5353
env:
@@ -56,6 +56,8 @@ jobs:
5656
--health-interval 10s
5757
--health-timeout 5s
5858
--health-retries 5
59+
volumes:
60+
- ./clickhouse/clickhouse-user-config/users.xml:/etc/clickhouse-server/users.d/custom.xml
5961
steps:
6062
- uses: actions/checkout@v4
6163
with:

ch/.formatter.exs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Used by "mix format"
2+
[
3+
inputs: ["{mix,.formatter}.exs", "{config,lib,test,bench}/**/*.{ex,exs}"]
4+
]

ch/.hex

258 Bytes
Binary file not shown.

ch/CHANGELOG.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Changelog
2+
3+
## 0.2.6 (2024-05-30)
4+
5+
- fix query encoding for datetimes where the microseconds value starts with zeroes `~U[****-**-** **:**:**.0*****]` https://github.com/plausible/ch/pull/175
6+
7+
## 0.2.5 (2024-03-05)
8+
9+
- add `:data` in `%Ch.Result{}` https://github.com/plausible/ch/pull/159
10+
- duplicate `Ch.Result.data` in `Ch.Result.rows` for backwards compatibility https://github.com/plausible/ch/pull/160
11+
- make `Ch.stream` emit `Ch.Result.t` instead of `Mint.Types.response` https://github.com/plausible/ch/pull/161
12+
- make `Ch.stream` collectable https://github.com/plausible/ch/pull/162
13+
14+
## 0.2.4 (2024-01-29)
15+
16+
- use `ch-#{version}` as user-agent https://github.com/plausible/ch/pull/154
17+
- fix query string escaping for `\t`, `\\`, and `\n` https://github.com/plausible/ch/pull/155
18+
19+
## 0.2.3 (2024-01-29)
20+
21+
- fix socket leak on failed handshake https://github.com/plausible/ch/pull/153
22+
23+
## 0.2.2 (2023-12-23)
24+
25+
- fix query encoding for datetimes with zeroed microseconds `~U[****-**-** **:**:**.000000]` https://github.com/plausible/ch/pull/138
26+
27+
## 0.2.1 (2023-08-22)
28+
29+
- fix array casts with `Ch` subtype https://github.com/plausible/ch/pull/118
30+
31+
## 0.2.0 (2023-07-28)
32+
33+
- move loading and dumping from `Ch` type to the adapter https://github.com/plausible/ch/pull/112
34+
35+
## 0.1.14 (2023-05-24)
36+
37+
- simplify types, again...
38+
39+
## 0.1.13 (2023-05-24)
40+
41+
- refactor types in `Ch.RowBinary` https://github.com/plausible/ch/pull/88
42+
43+
## 0.1.12 (2023-05-24)
44+
45+
- replace `{:raw, data}` with `encode: false` option, add `:decode` option https://github.com/plausible/ch/pull/42
46+
47+
## 0.1.11 (2023-05-19)
48+
49+
- improve Enum error message invalid values during encoding: https://github.com/plausible/ch/pull/85
50+
- fix `\t` and `\n` in query params https://github.com/plausible/ch/pull/86
51+
52+
## 0.1.10 (2023-05-05)
53+
54+
- support `:raw` option in `Ch` type https://github.com/plausible/ch/pull/84
55+
56+
## 0.1.9 (2023-05-02)
57+
58+
- relax deps versions
59+
60+
## 0.1.8 (2023-05-01)
61+
62+
- fix varint encoding
63+
64+
## 0.1.7 (2023-04-24)
65+
66+
- support RowBinaryWithNamesAndTypes
67+
68+
## 0.1.6 (2023-04-24)
69+
70+
- add Map(K,V) support in Ch Ecto type
71+
72+
## 0.1.5 (2023-04-23)
73+
74+
- fix query param encoding like Array(Date)
75+
- add more types support in Ch Ecto type: tuples, ipv4, ipv6, geo
76+
77+
## 0.1.4 (2023-04-23)
78+
79+
- actually support negative `Enum` values
80+
81+
## 0.1.3 (2023-04-23)
82+
83+
- support negative `Enum` values, fix `Enum16` encoding
84+
85+
## 0.1.2 (2023-04-23)
86+
87+
- support `Enum8` and `Enum16` encoding
88+
89+
## 0.1.1 (2023-04-23)
90+
91+
- cleanup published docs

ch/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Plausible Insights OÜ
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)