home *** CD-ROM | disk | FTP | other *** search
- // SybaseAdaptor.h
- // Copyright 1994, NeXT Software, Inc.
-
- #import <EOAccess/EOAccess.h>
-
- @class SybaseContext;
-
- // Defines for keys in connection dictionary
- #define USERNAME @"userName"
- #define HOSTNAME @"hostName"
- #define DATABASENAME @"databaseName"
- #define PASSWORD @"password"
-
- // If this key is present, it will be used as the setting to LC_ALL
- // used to specify the language and character set for server connections.
- // On J systems this option defaults to japanese
- #define LC_ALL_KEY @"LC_ALL"
-
- // If this key is found in the connection dictionary with a value of "Yes",
- // the adaptor enables the System 10 Password encryption feature before
- // attempting to open a connection
- #define ENCRYPTPASSWORD @"sybasePasswordEncryption"
-
- // The SybaseAdaptor, SybaseContext, and SybaseChannel may raise exceptions
- // due to programming errors that result in invalid argument values or internal
- // inconsistencies. In addition, messages, errors, and failure status returned
- // from the Sybase SQL Server and client libraries may also result in
- // EOGeneralAdaptorExceptions. When an exception results from a call_back to
- // the CS_CLIENTMSG_CB (Sybase ClientMessage callback) or the CS_SERVERMSG_CB
- // (Sybase ServerMessage callback). All of the information passed into this
- // routine will be available in the userInfo dictionary contained by the
- // exception. When the exception was raised as a result to the clientMessage
- // callback, users can get the information provided by the client library by
- // asking:
- // clientMsgDict = [[localException userInfo] objectForKey:@"sybaseClientMessageDictionary"];
-
- // The clientMsgDict contains the following keys which have values corresponding
- // to those sent in the callback function that raised the exception: msgstring,
- // osstring, sqlstate, severity, msgnumber, osnumber, status.
-
- // Similarly, when the exception was raised as a result to the serverMessage
- // callback, users can get the information provided by the server by asking:
- // svrMsgDict = [[localException userInfo] objectForKey:@"sybaseServerMessageDictionary"];
-
- // The svrMsgDict contains the following keys which have values corresponding
- // to those sent in the callback function that raised the exception: text,
- // svrname, proc, sqlstate, msgnumber, state, severity, line, status.
-
- @interface SybaseAdaptor:EOAdaptor
- {
- NSMutableDictionary *_typesByName;
- NSMutableArray *_channels;
- unsigned _connections;
- struct
- {
- unsigned hasConnectedWithDictionary:1;
- unsigned _RESERVED:31;
- } _flags;
-
- }
-
- - (void)prepareEnvironmentForConnect;
- - (void)resetEnvironmentAfterConnect;
- // These should bracket all calls to ct_connect() to set
- // the LC_ALL environment variable setting to the
- // value specified in the model connection dictionary.
-
- - (void)sybaseContextWillConnect:(SybaseContext *)context;
- - (void)sybaseContextDidDisconnect:(SybaseContext *)context;
-
- + (NSDictionary *)externalToInternalTypeMap;
- // This method returns a dictionary that maps each predefined externalType
- // known by the database to a default internal type.
- + (NSString *)primitiveTypeForExternalType:(NSString *)extType model:(EOModel *)model;
- // For a given custom type defined on the server, return the
- // primitive type on which it is based.
-
- + (NSString *)internalTypeForExternalType:(NSString *)extType model:(EOModel *)model;
- + (NSArray *)externalTypesWithModel:(EOModel *)model;
- // Defined in the EOAdaptor class as a methods that subclasses must implement
- // to provide type information for the model file.
- @end
-
-
-