Documentation Archive Developer
Search
[an error occurred while processing this directive] PATH  Documentation > WebObjects 4.5 > OracleEOAdaptor Reference

Table of Contents

OracleChannel


Inherits from: EOAdaptorChannel : NSObject
Declared in: OracleEOAdaptor/OracleChannel.h
OracleEOAdaptor/OracleDescription.h




Class Description


An OracleChannel represents an independent communication channel to the database server its OracleAdaptor is connected to. All of an OracleChannel's operations take place within the context of transactions controlled or tracked by its OracleContext. An OracleContext can manage multiple OracleChannels, and a channel is associated with only one context.

The features OracleChannel adds to EOAdaptorChannel are as follows:




Method Types


Finding table names
+ oracleTableNamesSQL
+ setOracleTableNamesSQL:
- describeTableNames
Accessing the fetch buffer length
- fetchBufferLength
- setFetchBufferLength:
Error handling
- raiseOracleError
- cursorDataArea


Class Methods



oracleTableNamesSQL

+ (NSString *)oracleTableNamesSQL

Returns the SQL statement that will be executed when building a default model.

setOracleTableNamesSQL:

+ (void)setOracleTableNamesSQL:(NSString *)sql

Sets to sql the SQL statement that will be used to return a list of table names from the database. By default, this list is the result of the SQL statement:SELECT TABLE_NAME FROM USER_TABLES ORDER BY TABLE_NAME

This setting is used by all OracleChannels in an application. You can specify a different SQL statement using the defaults write command, for example:

% defaults write NSGlobalDomain OracleTableNamesSQL "SELECT TABLE_NAME FROM..."

Once you use setOracleTableNamesSQL: to specify a setting, it supersedes values set with the defaults write command.




Instance Methods



cursorDataArea

- (struct cda_def *)cursorDataArea

If the channel is connected, returns an Oracle-specific data structure (cda_def) describing characteristics of the channel. Otherwise, returns NULL. This method is commonly used with the method raiseOracleError to determine why an error occurred.

describeTableNames

- (NSArray *)describeTableNames

Overrides the EOAdaptorChannel implementation to return an array of the names of all the tables owned by the current user. Uses the SQL returned by oracleTableNamesSQL.

fetchBufferLength

- (unsigned)fetchBufferLength

Returns the size, in bytes, of the fetch buffer. The larger the buffer, the more rows can be returned for each round trip to the server.

raiseOracleError

- (void)raiseOracleError

Examines Oracle structures for error flags and raises an exception if one is found. The userInfo of the exception contains the Oracle error code in an entry with the key OracleErrorKey.

setFetchBufferLength:

- (void)setFetchBufferLength:(unsigned)length

Sets to length the size, in bytes, of the fetch buffer. The larger the buffer, the more rows can be returned for each round trip to the server.


Table of Contents