SybaseAdaptor
Inherits from: EOAdaptor : NSObject
Package: com.apple.yellow.sybaseeoadaptor
Class Description
A SybaseAdaptor represents a single connection to a Sybase database server, and is responsible for keeping login and model information, performing Sybase-specific formatting of SQL expressions, and reporting errors.
The features SybaseAdaptor adds to EOAdaptor are as follows:
- The ability to specify a client character set and language
- Sybase password encryption
The SybaseAdaptor class has these restrictions: A context can only manage one channel at a time, and the adaptor doesn't support full outer joins because the Sybase server itself doesn't support them.
Constants
SybaseAdaptor defines the following string constants for use as connection dictionary keys.
Constant | Corresponding value in the connection dictionary |
HOSTNAME | The name of the machine on which the database server runs. |
DATABASENAME | The name of the database. |
USERNAME | The name of the user to log in as. |
PASSWORD | The user's password. |
LC_ALL_KEY | The setting to LC_ALL, which is used to specify the language and character set for server connections. On J systems this option defaults to japanese. |
ENCRYPTPASSWORD | Either the string "Yes" or the string "No". If the value is "Yes", the adaptor enables the System 10 password encryption feature before attempting to open a connection. |
PRIMITIVE_TYPE_MAP | A dictionary representing the database's primitive
type map. Sybase allows user defined types in a database that map
onto primitive types. For instance, you could define a user type, primary_key ,
and map it to int . The
primitive type map dictionary would then contain the key "primary_key"
with the value "int". |
For more information on the connection dictionary, see "The Connection Dictionary" in the SybaseEOAdaptor framework introduction.
Method Types
- Mapping external types to internal types
- externalToInternalTypeMap
- primitiveTypeForExternalTypeInModel
- Getting information from the connection dictionary
- connectionKeys
- Bracketing calls to ct_connect()
- prepareEnvironmentForConnect
- resetEnvironmentAfterConnect
- Callback methods
- sybaseContextDidDisconnect
- sybaseContextWillConnect
Static Methods
externalToInternalTypeMap
public static NSDictionary externalToInternalTypeMap()
primitiveTypeForExternalTypeInModel
public static String primitiveTypeForExternalTypeInModel(
String externalType,
com.apple.yellow.eoaccess.EOModel model)
Instance Methods
connectionKeys
public NSArray connectionKeys()
prepareEnvironmentForConnect
public void prepareEnvironmentForConnect()
See Also: resetEnvironmentAfterConnect
resetEnvironmentAfterConnect
public void resetEnvironmentAfterConnect()
See Also: prepareEnvironmentForConnect
sybaseContextDidDisconnect
public void sybaseContextDidDisconnect(SybaseContext aSybaseContext)
sybaseContextWillConnect
public void sybaseContextWillDisconnect(SybaseContext aSybaseContext)