eventql-crystal
Version, currently 0.1.12 versions
- 0.1.1latestJun 10, 2017
- 0.1.0not indexedJun 10, 2017
github.com/trendier-ai/eventql-crystal
EventQL crystal driver
8 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
eventql-crystal:
github: trendier-ai/eventql-crystal
version: ~> 0.1.1Then run:
shards installshard.yml
- Crystal
0.22.0- License
- MIT
- Author
- metacortex <0@measurechina.cn>
Dependencies
This version declares no dependencies.
README
[](https://travis-ci.org/MeasureChina/eventql-crystal)
# eventql-crystal
EventQL driver for Crystal ([eventql.io](http://eventql.io))
Based on the official ruby driver
https://github.com/eventql/eventql/tree/master/drivers/ruby
## Installation
Add this to your application's `shard.yml`:
```yaml
dependencies:
eventql-crystal:
github: measurechina/eventql-crystal
```
## Usage
```crystal
require "eventql-crystal"
# init
client = EventQL.connect({
"host" => "localhost",
"port" => "9175",
"database" => "sensors",
})
# insert rows
body = [
{
database: "test",
table: "sensors",
data: {
time: Time.now.to_utc.to_s("%FT%XZ"),
session_id: "s1",
url: "/page1",
}
}
].to_json
result = client.insert!(body)
# query
query = client.query("SELECT COUNT(1) FROM sensors;")
response = query.execute!
# [{"type" => "table", "columns" => ["COUNT(1)"], "rows" => [["1"]]}]
query = client.query("SELECT * FROM sensors;")
response = query.execute!
```
## TODO:
- [ ] table create/drop/list
- [ ] table add_field/remove_field
- [ ] Time conversion util
- [ ] time zone util
- [ ] MapReduce query
- [ ] json mapping helper
## Contributing
1. Fork it ( https://github.com/measurechina/eventql-crystal/fork )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.1- Tagged
- Jun 10, 2017
- Commit
2b0fe5e25e98- Crystal
0.22.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/trendier-ai/eventql-crystal
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 13, 2026
- Synced
- Aug 13, 2026
- Versions
- 2