Class: PG::Result
- Inherits:
-
Object
- Object
- PG::Result
- Defined in:
- lib/ext/pg.rb
Instance Method Summary collapse
Instance Method Details
#each_value(&block) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/ext/pg.rb', line 6 def each_value(&block) if block_given? self.each_row { |r| yield(r.first) } else self.each_row.map { |r| r.first } end end |
#empty? ⇒ Boolean
14 |
# File 'lib/ext/pg.rb', line 14 def empty?() ntuples == 0 end |
#to_a ⇒ Object
16 |
# File 'lib/ext/pg.rb', line 16 def to_a() self.values end |
#value ⇒ Object
4 |
# File 'lib/ext/pg.rb', line 4 def value() self.getvalue(0, 0) end |