Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/puppetpies/kemal-monetdb
MonetDB Data connection for Kemal
https://github.com/puppetpies/kemal-monetdb
Last synced: 30 days ago
JSON representation
MonetDB Data connection for Kemal
- Host: GitHub
- URL: https://github.com/puppetpies/kemal-monetdb
- Owner: puppetpies
- Created: 2016-06-21T17:42:19.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-06-30T13:46:02.000Z (over 8 years ago)
- Last Synced: 2024-08-03T17:12:52.138Z (4 months ago)
- Language: Crystal
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-crystal - kemal-monetdb - MonetDB Data connection for Kemal (Framework Components)
README
# kemal-monetdb
Kemal Data connnection layer for MonetDB
This is currently experimental.
## Installation
Add this to your application's `shard.yml`:
```yaml
dependencies:
kemal-monetdb:
github: puppetpies/kemal-monetdb
```## Usage
```crystal
require "kemal"
require "kemal-monetdb"CONN_OPTS = {
"host" => "127.0.0.1",
"user" => "monetdb",
"password" => "monetdb",
"port" => "50000",
"db" => "test"
}monetdb_connect CONN_OPTS
# Make sure to yield `env`.
get "/" do |env|
env.content_type = "application/json"
users = conn.query("SELECT * FROM users")
# Release the connection after you are done with exec
release
# Renders the users as JSON
users
end```
## DevelopmentTODO: Test / Implement the connection pool as in kemal-mysql
## Contributing
1. Fork it ( https://github.com/puppetpies/kemal-monetdb/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## Contributors
- [puppetpies](https://github.com/puppetpies) Bri in The Sky - creator, maintainer