- (void)afterLastRow;
- (void)beforeFirstRow;
id
(NSString, NSNumber, etc.).
Result: object or nil if any problem occurs.- (id)curRowField:(int)fieldIndex;
- (void)firstRow;
nextRow
and previousRow
will move the cursor up and down resp.[conn goRow:N-1]
and then [conn nextRow]
- (void)goRow:(int)rowIndex;
Name Description rowIndex where to position the internal index.
nextRow
and previousRow
and equivalent to goRowRelative:1
and goRowRelative:-1
resp.
- (void)goRowRelative:(int)deltaIndex;
Name Description delta to add to internal row index. (If delta is negative we move backward).
Result: YES if column at- (BOOL)isColumnNULL:(int)fieldIndex;
fieldIndex
is NULL
- (void)lastRow;
Result: YES if successful, NO if the current row is no more valid (after the last row).- (BOOL)nextRow;
Result: YES if successful, NO if the current row is no more valid (before the first row).- (BOOL)previousRow;
- (NSDictionary *)resultAsDictionary;
resultAsDictionnary returns a dictionary structured as follows
<dict>
<key>columns/key>
<array>
<dict>
<key>name</key>
<string>columnTitle</string>
<key>typeName</key>
<string>columnTypeName</string>
<key>typeOid</key>
<integer>columnTypeOid</integer>
</dict>
...
</array>
<key>fields/key>
<array>
<string>columnFieldValue</string>
...
</array>
</dict>
Since PostgreSQL allows creation of new types, we don't provide yet
an automatic conversion from the PostgreSQL type to the plist one.
curRowIndex
used by nextRow
and previousRow
methodswhile ([psql nextRow]) {
...
}
Result: the number of columns of latest executed command.- (int)resultColumnCount;
Result: the name of the column at index col.- (const char *)resultColumnName:(int)col;
Result: the type oid of the column at index col.- (Oid)resultColumnType:(int)col;
Result: the name of the type of the column at index col.- (const char *)resultColumnTypeName:(int)col;
Result: NSArray of field values of current row or nil if an error occurs.- (NSArray *)resultRowAsArray;
col
in latest result.Result: "NOT_SUPPORTED_BY_POSTGRESQL"- (const char *)resultTableName:(int)col;
Result: How many rows were affected by latest query executed (SELECT).- (int)rowsAffected;
Result: how many rows were affected by latestquery executed (UPDATE, DELETE, INSERT).- (int)rowsAffectedByCommand;
(Last Updated 12/27/2002)