Class: PGrow

Class | PGrow
In: | postgres.c
Parent: | Array

Array subclass that provides hash-like behavior.

### Methods

[] each each_key each_pair each_value keys new to_hash values

### Public Class methods

PGconn.open(connection_hash) → PGconn
PGconn.open(connection_string) → PGconn
PGconn.open(host, port, options, tty, dbname, login, passwd) → PGconn

host: | server hostname
port: | server port number
options: | backend options (String)
tty: | tty to print backend debug message (ignored in newer versions of PostgreSQL) (String)
dbname: | connecting database name
login: | login user name
passwd: | login password

On failure, it raises a PGError exception.

### Public Instance methods

row[position] → value
row[name] → value

Access elements of this row by column position or name.

row.each { |column, value| block } → row
row.each { |value| block } → row

Iterate with values or column,value pairs.

row.each_key { |column| block } → row

Iterate with column names.

row.each_pair { |column_value_array| block } → row

Iterate with column,value pairs.

row.each_value { |value| block } → row

Iterate with values.

row.keys → Array

Column names.

row.to_hash → Hash

Returns a `Hash` of the row‘s values indexed by column name. Equivalent to `Hash [*row.keys.zip(row).flatten]`

values()

call-seq:

      row.values -> row

[Validate]