Table A.4, “Record Methods” contains the exhaustive list of methods, in alphabetical order. The documentation of each method follows.
Table A.4. Record Methods
| Type | Name | Args |
|---|---|---|
| method |
| 0 |
| method |
| 1 |
| method |
| 1 |
| method |
| 1 |
| method |
| 1 |
| method |
| 0 |
| method |
| 1 |
| method |
| 0 |
| method |
| 0 |
| method |
| 1 |
[]() returns the value of the field given its name or
index.
def []?(key)
key: the name or index of the value to
check.
each() iterates over each key/value pair in the record.
fieldName() returns the field name of a field given
its index.
def fieldName(index)
index: the index of the field whose name to return.
fieldType() returns the field type of a field given
its index. It is basically going to boil down to either
String or Fixnum.
def fieldType(index)
index: the index of the field whose type to return.
has_key?() returns true if there is a column in the
row by the given name
def has_key?(name)
name: the of the column.
indexOf() returns the index of the column in the row
by the given name
def indexOf(name)
name: the of the column whose index to
return.
isEmpty?() returns true if there are no fields in the
record.
isNull?() returns true if the field by the given
index contains a NULL value.
def isNull?(key)
key: the name or index of the column to
check.
keys() iterates over each key in the record.
values() iterates over each value in the record.