Sha256: 97c25bf66725b69c36a9097198929b69da104b37438211591981290998133b8a

Contents?: true

Size: 289 Bytes

Versions: 18

Compression:

Stored size: 289 Bytes

Contents

require 'pg'

class PG::Result
  def value() self.getvalue(0, 0) end

  def each_value(&block)
    if block_given?
      self.each_row { |r| yield(r.first) }
    else
      self.each_row.map { |r| r.first }
    end
  end

  def empty?() ntuples == 0 end

  def to_a() self.values end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
prick-0.19.0 lib/ext/pg.rb
prick-0.18.0 lib/ext/pg.rb
prick-0.17.0 lib/ext/pg.rb
prick-0.16.0 lib/ext/pg.rb
prick-0.15.0 lib/ext/pg.rb
prick-0.14.0 lib/ext/pg.rb
prick-0.13.0 lib/ext/pg.rb
prick-0.12.0 lib/ext/pg.rb
prick-0.11.0 lib/ext/pg.rb
prick-0.10.0 lib/ext/pg.rb
prick-0.9.0 lib/ext/pg.rb
prick-0.8.0 lib/ext/pg.rb
prick-0.7.0 lib/ext/pg.rb
prick-0.6.0 lib/ext/pg.rb
prick-0.5.0 lib/ext/pg.rb
prick-0.4.0 lib/ext/pg.rb
prick-0.3.0 lib/ext/pg.rb
prick-0.2.0 lib/ext/pg.rb