Příklad 38.3. list-records.rb
#!/usr/bin/env ruby # $Id: list_records.rb,v 1.3 2002/11/06 05:47:51 radek Exp $ # $Source: /home/radek/cvs/ruby-book/example/dbi/list_records.rb,v $ require 'dbi' DBI.connect('DBI:Pg:dbname=testdb;host=sql', 'radek') do |dbh| puts "selecting..." dbh.select_all('SELECT Id,Nazev FROM Firma') do |row| p row end end