kemal-monetdb

MonetDB Data connection for Kemal
HEAD Latest release released

kemal-monetdb

Kemal Data connnection layer for MonetDB

This is currently experimental.

Installation

Add this to your application's shard.yml:

dependencies:
  kemal-monetdb:
    github: puppetpies/kemal-monetdb

Usage

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

Development

TODO: 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

kemal-monetdb:
  github: puppetpies/kemal-monetdb
  
License MIT
Crystal none

Authors

Dependencies 2

  • crystal-monetdb-libmapi master
    {'branch' => 'master', 'github' => 'puppetpies/crystal-monetdb-libmapi'}
  • pool master
    {'branch' => 'master', 'github' => 'ysbaddaden/pool'}

Development Dependencies 0

Dependents 0

Last synced .
search fire star recently