home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OpenStep (Enterprise)
/
OpenStepENTCD.toast
/
OEDEPLOY
/
SYBASEAD.Z
/
SybaseChannel.h
< prev
next >
Wrap
Text File
|
1996-09-09
|
2KB
|
83 lines
// SybaseChannel.h
// Copyright 1994, NeXT Software, Inc.
#import <EOAccess/EOAccess.h>
@class SybaseAdaptor;
@class SybaseContext;
typedef enum
{
SybaseRegularRow,
SybaseComputeRow,
SybaseReturnParameterRow,
SybaseReturnStatusRow
} SybaseRowType;
typedef enum
{
SybaseRowFetch,
SybaseReturnParameterFetch,
SybaseReturnStatusFetch,
SybaseTerminatedFetch
} SybaseFetchState;
@interface SybaseChannel:EOAdaptorChannel
{
void *_ct_cmd;
SybaseRowType _rowType;
SybaseFetchState _fetchState;
int _rowsAffected;
int _computeRowId; // only valid when _resultType == SybaseComputeRow;
int _severityLevelToIgnore;
int _rowsProcessedCount;
NSMutableArray *_columns;
NSArray *_selectedAttributes;
unsigned _rowCapacity;
unsigned _nextRowInBuffer;
BOOL _columnsAreBound;
BOOL _beganTransaction;
NSMutableArray *_storedProcedureColumns;
NSMutableDictionary *_outOfBandValues;
struct
{
unsigned fetchInProgress:1;
unsigned relinquishConnectionAfterFetch:1;
unsigned isOpen:1;
unsigned canUseArrayFetch:1;
unsigned _RESERVED:28;
} _flags;
struct {
unsigned willFetchAttributes:1;
unsigned willReturnRow:1;
unsigned _RESERVED:30;
} _sybaseDelegateRespondsTo;
}
- initWithSybaseContext:(SybaseContext *)adaptorContext;
@end
@interface NSObject(SybaseChannelDelegation)
- (NSArray *)sybaseChannel:(SybaseChannel *)channel
willFetchAttributes:(NSArray *)attributes
forRowOfType:(SybaseRowType)rowType
withComputeRowId:(int)computeRowId;
// Invoked whenever a row fetched, the delegate can return nil which
// will cause the row to be skipped, or replace the attributes with a
// set of attributes that is appropriate for the type of row that is
// being fetched. Delegates can have the channel fabricate a set of
// attributes for the current non-regular row by calling describe
// attributes at this point.
- (BOOL)sybaseChannel:(SybaseChannel *)channel
willReturnRow:(NSDictionary *)row ofType:(SybaseRowType)rowType
withComputeRowId:(int)computeRowId;
// Invoked once a row has been read in an packaged into the dictionary.
// Delegates return YES to cause the row to be returned from
// fetchAttributes:WithZone: or they can return NO to cause the row to
// be skipped.
@end