Object
# File lib/postgres-pr/postgres-compat.rb, line 76 def [](index) @result[index] end
free the result set
# File lib/postgres-pr/postgres-compat.rb, line 134 def clear @res = @fields = @result = nil end
# File lib/postgres-pr/postgres-compat.rb, line 129 def cmdstatus @res.cmd_tag || '' end
Returns the number of rows affected by the SQL command
# File lib/postgres-pr/postgres-compat.rb, line 139 def cmdtuples case @res.cmd_tag when nil return nil when /^INSERT\s+(\d+)\s+(\d+)$/, /^(DELETE|UPDATE|MOVE|FETCH)\s+(\d+)$/ $2.to_i else nil end end
# File lib/postgres-pr/postgres-compat.rb, line 72 def each(&block) @result.each(&block) end
# File lib/postgres-pr/postgres-compat.rb, line 98 def fieldname(index) @fields[index] end
# File lib/postgres-pr/postgres-compat.rb, line 102 def fieldnum(name) @fields.index(name) end
# File lib/postgres-pr/postgres-compat.rb, line 117 def getvalue(tup_num, field_num) @result[tup_num][field_num] end
# File lib/postgres-pr/postgres-compat.rb, line 94 def num_fields @fields.size end
# File lib/postgres-pr/postgres-compat.rb, line 90 def num_tuples @result.size end
# File lib/postgres-pr/postgres-compat.rb, line 111 def size(index) raise # TODO: correct? @res.fields[index].typlen end
Generated with the Darkfish Rdoc Generator 2.