Popularity
4.1
Declining
Activity
0.0
Stable
7
5
1
Programming language: Crystal
License: MIT License
Tags:
Database Drivers
Latest version: v0.1.1
eventql-crystal alternatives and similar shards
Based on the "Database Drivers" category.
Alternatively, view eventql-crystal alternatives based on common mentions on social networks and blogs.
-
crystal-monetdb-libmapi
Crystal bindings for MonetDB
Static code analysis for 29 languages.
Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.
Promo
www.sonarqube.org
Do you think we are missing an alternative of eventql-crystal or a related project?
README
eventql-crystal
EventQL driver for Crystal (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
:
dependencies:
eventql-crystal:
github: measurechina/eventql-crystal
Usage
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
- Fork it ( https://github.com/measurechina/eventql-crystal/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request