0.0
No commit activity in last 3 years
No release in over 3 years
A mini-language for building and executing SQL statements against a postgresql database. This is a very old library, pre-dating active record and lacking many of its refinments. New projects will probably not want to use it.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.8.4
~> 1.0.1
~> 10.0.3
~> 2.12.0

Runtime

~> 0.13.2
 Project Readme

sqlpostgres¶ ↑

sqlpostgres is a mini-language for building and execting SQL statements against a postgresql database.

This is a very old library, pre-dating active record and lacking many of its refinements. New projects will probably not want to use this.

INSTALL¶ ↑

$ gem install USPS-intelligent-barcode

EXAMPLE¶ ↑

require "sqlpostgres"

include SqlPostgres

Connection.open do |connection|
  connection.exec("create temporary table foo (t text)")

  insert = Insert.new('foo', connection)
  insert.insert('t', 'Smith')
  insert.exec

  insert = Insert.new('foo', connection)
  insert.insert('t', 'Jones')
  insert.exec

  update = Update.new('foo', connection)
  update.set('t', "O'Brien")
  update.where(["t = %s", "Smith"])
  update.exec  

  select = Select.new(connection)
  select.select('t')
  select.from('foo')
  select.order_by('t')
  p select.exec
  # [{"t"=>"Jones"}, {"t"=>"O'Brien"}]

end

RUBY VERSIONS¶ ↑

The tests are known to pass in MRI 1.8.7 and MRI 1.9.3

POSTGRES VERSIONS¶ ↑

This library works with Postgres 1.8 and Postgres 1.9.

ENCODINGS¶ ↑

This library only works properly with the SQL-ASCII encoding.

WHOAMI¶ ↑

Wayne Conrad <wconrad@yagni.com>

CONTRIBUTORS¶ ↑

Sam Kellogg <sam@nickstoys.com>