clickhouse-crystal
Version, currently master branch1 version
- master branchlatestFeb 1, 2019
github.com/trendier-ai/clickhouse-crystal
clickhouse driver for crystal lang
7 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
clickhouse-crystal:
github: trendier-ai/clickhouse-crystal
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.22.0- License
- MIT
- Author
- metacortex <0@measurechina.io>
Dependencies
This version declares no dependencies.
README
# clickhouse-crystal
clickhouse for crystal-lang
## Installation
Add this to your application's `shard.yml`:
```yaml
dependencies:
clickhouse-crystal:
github: measurechina/clickhouse-crystal
```
## Usage
```crystal
require "clickhouse-crystal"
# init
client = Clickhouse.connect({
"host" => "localhost",
"port" => "8123",
"database" => "sensors",
})
# insert
body = [
{
table: "test_db.sensors",
columns: %w(uid name date),
data: [
[11, "son", "2017-03-01 11:12:13"],
[22, "park", Time.now.to_s("%F %X")],
],
},
]
result = client.insert!(body)
# query
query = client.query("SELECT COUNT(1) FROM sensors")
response = query.execute!
query = client.query("SELECT * FROM sensors;")
response = query.execute!
```
## Contributors
- metacortex - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Feb 1, 2019
- Crystal
0.22.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/trendier-ai/clickhouse-crystal
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 12, 2026
- Synced
- Aug 12, 2026
- Versions
- 1