WCTRowSelect Class Reference
Inherits from | WCTSelectBase : WCTChainCall : WCTCore : NSObject |
---|---|
Declared in | WCTRowSelect.h |
Overview
Not Thread-safe
If you only select one column result from table, you can use nextValue and allValues interface to avoid unwraping for row. Otherwise, you should use nextRow and allRows interface.
– nextRow
Get next selected row. You can do an iteration using it.
WCTOneRow* row = nil;
while ((row = [rowSelect nextRow])) {
NSString* result1 = row[0];
NSNumber* result2 = row[1];
NSData* result3 = row[2];
NSNull* result4 = row[3];
}
- (WCTOneRow *)nextRow
Return Value
WCTOneRow is a NSArray collection of WCTValue. The real type of WCTValue depends on your selection, which can be NSString, NSNumber, NSData or NSNull. See the example above.
Declared In
WCTRowSelect.h
– allRows
Get all selected row.
for (WCTOneRow* row in [rowSelect allRows]) {
NSString* result1 = row[0];
NSNumber* result2 = row[1];
NSData* result3 = row[2];
NSNull* result4 = row[3];
}
- (WCTColumnsXRows *)allRows
Return Value
WCTColumnsXRows is a NSArray collection of WCTOneRow. Since WCTOneRow is a wrapper of NSArray, WCTColumnsXRows is a dual array. The real type of WCTValue depends on your selection, which can be NSString, NSNumber, NSData or NSNull. See the example above.
Declared In
WCTRowSelect.h
– nextValue
Get next selected value. You can do an iteration using it.
WCTValue* value = nil;
while ((value = [rowSelect nextValue])) {
if ([value isKindOfClass:NSString.class]) {
}else if ([value isKindOfClass:NSNumber.class]) {
}else if ([value isKindOfClass:NSData.class]) {
}else if ([value isKindOfClass:NSNull.class]||value==nil) {
}
}
- (WCTValue *)nextValue
Return Value
The real type of WCTValue depends on your selection, which can be NSString, NSNumber, NSData or NSNull. See the example above.
Declared In
WCTRowSelect.h
– allValues
Get all selected values.
for (WCTValue* value in [rowSelect allValues]) {
if ([value isKindOfClass:NSString.class]) {
}else if ([value isKindOfClass:NSNumber.class]) {
}else if ([value isKindOfClass:NSData.class]) {
}else if ([value isKindOfClass:NSNull.class]||value==nil) {
}
}
- (WCTOneColumn *)allValues
Return Value
WCTOneColumn is a NSArray collection of WCTValue. The real type of WCTValue depends on your selection, which can be NSString, NSNumber, NSData or NSNull. See the example above.
Declared In
WCTRowSelect.h