-
Notifications
You must be signed in to change notification settings - Fork 0
PostgreSQL-API for Ruby
License
BertramScharpf/ruby-pgsql
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
= pgsql Ruby Gem A PostgreSQL library that was carefully designed. == Author Bertram Scharpf <software@bertram-scharpf.de> == Features * Connection parameters from hash * Query parameters * Asynchronous queries * Quick query of single lines or values * Full PostgreSQL quoting support * Built-in transactions and savepoints by Ruby blocks == Example Write something like this: require "pgsql" Pg::Conn.open :dbname => "test1", :user => "jdoe" do |conn| conn.exec "SELECT * FROM mytable;" do |result| result.each { |row| l = row.join ", " ... } end cmd = <<-ENDSQL SELECT * FROM mytable WHERE num=$1::INTEGER; ENDSQL conn.query cmd, 42 do |row| l = row.join ", " ... end ... end == Thanks In the remembrance of Guy Decoux.
About
PostgreSQL-API for Ruby
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published