Git Product home page Git Product logo

sqlpostgres's Introduction

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 <[email protected]>

CONTRIBUTORS

Sam Kellogg <[email protected]>

sqlpostgres's People

Contributors

wconrad avatar

Watchers

James Cloos avatar Sam Kellogg avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.