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

Table of Contents

InformixAdaptor


Inherits from: EOAdaptor : NSObject
Package: com.apple.yellow.informixeoadaptor


Class Description


An InformixAdaptor represents a single connection to an Informix database server, and is responsible for keeping login and model information, performing Informix-specific formatting of SQL expressions, and reporting errors.

The InformixAdaptor doesn't support full outer joins.




Constants


InformixAdaptor defines the following string constants for use as connection dictionary keys.


Constant Corresponding value in the connection dictionary
dbNameKey The name of the database.
userNameKey The name of the user to log in as.
passwordKey The user's password.

It defines a string constant for use as a key in an exception's userInfo dictionary (see raiseInformixError).


Constant Corresponding value in an exception's userInfo dictionary
InformixErrorKey The error code raised in the Informix server.

InformixAdaptor also defines a string constant to identify the user defaults domain for the Informix adaptor.


Constant Description
EOF_INFORMIX_ADAPTOR The name of the user defaults domain for the Informix adaptor.



Method Types


Mapping external types to internal types
externalToInternalTypeMap
Getting information from the connection dictionary
informixConnectionString
informixDefaultForKey
informixPassword
informixUserName
connectionKeys
Error handling
raiseInformixError
Preparing to connect
prepareEnvironmentForConnect
resetEnvironmentAfterConnect
Callback methods
informixContextDidDisconnect
informixContextWillConnect
Getting adaptor-specific classes
adaptorContextClass
adaptorChannelClass


Static Methods



externalToInternalTypeMap

public static NSDictionary externalToInternalTypeMap()

Returns the mapping between each predefined external (database) type known by the adaptor to a default internal type. For information on the mapping, see the section in the InformixEOAdaptor Framework introduction titled "Data Type Mapping" .


Instance Methods



adaptorChannelClass

public Class adaptorChannelClass()

Returns the InformixChannel class.

adaptorContextClass

public Class adaptorContextClass()

Returns the InformixContext class.

connectionKeys

public NSArray connectionKeys()

Returns an NSArray containing the keys in the receiver's connection dictionary. You can use this method to prompt the user to supply values for the connection dictionary.

informixConnectionString

public String informixConnectionString()

Returns the user name, password, and database name as a string suitable to be supplied as an argument to db_connect().

informixContextDidDisconnect

public void informixContextDidDisconnect(InformixContext logon)

Callback method that is invoked after the associated Informix context disconnects.

informixContextWillConnect

public void informixContextWillConnect(InformixContext logon)

Callback method that is invoked just before the associated Informix context disconnects.

informixDefaultForKey

public String informixDefaultForKey(String key)

Returns the user default setting for key. To get this information it first checks the user defaults, and then the adaptor's internal defaults dictionary.

informixPassword

public String informixPassword()

Returns the password in the connection dictionary.

informixUserName

public String informixUserName()

Returns the user name in the connection dictionary.

prepareEnvironmentForConnect

public void prepareEnvironmentForConnect()

Prepares the user environment for connection to an Informix server. Preserves existing environment variables, replacing them with values obtained from the adaptor's connection dictionary. Unset variables are set to values obtained from informixDefaultForKey, if any.

See Also: resetEnvironmentAfterConnect



raiseInformixError

public void raiseInformixError(String sqlString)

Examines Informix structures for error flags and raises an exception if one is found. Extracts the error information in the connection structure and uses it to build and raise an exception. The error code is available in the exception's user info dictionary in the entry for the key, InformixErrorKey.

resetEnvironmentAfterConnect

public void resetEnvironmentAfterConnect()

Restores any environment variables overwritten by prepareEnvironmentForConnect.


Table of Contents