MCPResult (MCPResultPlus)


Declared In:
MCPResultPlus.h


Category Description

$Id: MCPResultPlus.m,v 1.1 2003/10/11 18:48:07 sergecohen Exp $

This Category is provided to get shortcuts reformat the table obtained by a MCPResult (fetching a column, a 2D array...).


Method Types

Getting a complete column as an array
- fetchColAtIndex:
- fetchColWithName:
Getting the complete result as 2D array
- fetch2DResultAsType:

Instance Methods

fetch2DResultAsType:

- (id)fetch2DResultAsType:(MCPReturnType)aType

Returns the complete result table in a 2D object, which type depends on aType:

- MCPTypeArray : a NSArray of rows as NSArray,

- MCPTypeDictionary : a NSArray of rows as NSDictionary,

- MCPTypeFlippedArray : a NSArray of columns (as NSArray),

- MCPTypeFlippedDictionary : a NSDictionary of columns (as NSArray)

In any case the read position is restored at the end of the call (hence a fetchRow will get the same row wether this method is called before it or not).


fetchColAtIndex:

- (NSArray *)fetchColAtIndex:(unsigned int)aCol

Getting a complete column into a NSArray (1D). The index starts from 0 (first column).

The index 0 of the returned array always correspond to the first row (ie: returned NSArray is indexed by row number), the read position is restored after to it's initial position after the read.


fetchColWithName:

- (NSArray *)fetchColWithName:(NSString *)aColName

The same as fetchColAtIndex:, but the choice of the column is done by it's field name. Indeed it is just a wrapper to fetchColAtIndex.


Version 1.1 Copyright ©2003 by Serge Cohen. All Rights Reserved. Mon Aug 09 11:00:26 2004