Wrapper around EM::PG for Green. And adapter for Sequel.
Ruby
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/green-em
spec
.gitignore
Gemfile
Gemfile.lock
README.md
Rakefile
green-em-pg.gemspec

README.md

green-em-pg

Simple wrapper around em-pg for Green. And Sequel adapter.

Usage

gem "green-em-pg"
require "green-em/pg"

ENV["GREEN_HUB"] = "EM"

db = Green::EM::PG.new host: "localhost",
  port: 5432,
  dbname: "test",
  user: "postgres",
  password: "postgres"
  
res = db.send_query "select * from test"

puts res.inspect

Sequel

require "green-em/pg/sequal"
url = "postgres://postgres:postgres@localhost:5432/test"
db = Sequel.connect(url, pool_class: Green::EM::PG::Sequel::ConnectionPool)

puts db[:test].all.inspect