You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -53,6 +54,28 @@ class ActionView < ActiveRecord::Base
53
54
end
54
55
```
55
56
57
+
### HTTP authentication mode
58
+
59
+
By default, the adapter sends `user` and `password` as URL parameters.
60
+
You can set `http_auth` explicitly (or omit it and keep the same default behavior):
61
+
62
+
```yml
63
+
clickhouse:
64
+
adapter: clickhouse
65
+
host: localhost
66
+
port: 8123
67
+
database: my_db
68
+
username: app_user
69
+
password: secret
70
+
http_auth: x_clickhouse_headers # or basic / query_params
71
+
```
72
+
73
+
- Use YAML string values: `http_auth: query_params`, `http_auth: basic`, or `http_auth: x_clickhouse_headers`.
74
+
- Both strings and Ruby symbols are accepted internally.
75
+
- `http_auth: x_clickhouse_headers` sends `X-ClickHouse-User`, `X-ClickHouse-Key`, and `X-ClickHouse-Database` headers.
76
+
- `http_auth: basic` sends `Authorization: Basic ...` and keeps `database` in URL params.
77
+
- `http_auth: query_params` sends `user`, `password`, and `database` in URL params (same as omitting `http_auth`).
78
+
56
79
## Usage in Rails
57
80
58
81
Add your `database.yml` connection information with postfix `_clickhouse` for you environment:
@@ -343,6 +366,38 @@ Donations to this project are going directly to [PNixx](https://github.com/PNixx
343
366
344
367
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
345
368
369
+
### Run locally
370
+
371
+
1. Start ClickHouse (single node):
372
+
373
+
```bash
374
+
docker compose -f .docker/docker-compose.yml up -d
375
+
```
376
+
377
+
2. Run single-node specs:
378
+
379
+
```bash
380
+
bin/test-single
381
+
```
382
+
383
+
If your local workflow expects `bin/single_test`, use the same command format as `bin/test-single`:
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
0 commit comments