Class: PGresult

Inherits:
Object
  • Object
show all
Defined in:
lib/og/store/psql.rb

Overview

Customize the standard postgres resultset to make more compatible with Og.

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/og/store/psql.rb', line 14

def blank?
	0 == num_tuples
end

#each_rowObject



22
23
24
25
26
# File 'lib/og/store/psql.rb', line 22

def each_row
	for row in (0...num_tuples)
		yield(self, row)
	end
end

#first_valueObject



28
29
30
31
32
# File 'lib/og/store/psql.rb', line 28

def first_value
	val = getvalue(0, 0)
	clear
	return val
end

#nextObject



18
19
20
# File 'lib/og/store/psql.rb', line 18

def next
	self
end