home *** CD-ROM | disk | FTP | other *** search
/ OpenStep (Enterprise) / OpenStepENTCD.toast / OEDEPLOY / INFORMAD.Z / InformixAdaptor.h < prev    next >
Text File  |  1996-09-09  |  2KB  |  71 lines

  1. // InformixAdaptor.h
  2. // Copyright (c) 1994, NeXT Software, Inc.  All rights reserved.
  3. //
  4.  
  5. #import <EOAccess/EOAccess.h>
  6.  
  7. @class InformixContext;
  8.  
  9. #define dbNameKey @"dbName"
  10. #define userNameKey @"userName"
  11. #define passwordKey @"password"
  12.  
  13. // Name of the UserDefaults domain for the Informix Adaptor
  14. #define EOF_INFORMIX_ADAPTOR @"EOFInformixAdaptor"
  15.  
  16. #define NlsLangKey @"NLS_LANG"
  17.  
  18. @interface InformixAdaptor:EOAdaptor
  19. {
  20.     unsigned short _connectedLogons;
  21. }
  22.  
  23. - initWithName:(NSString *)name;
  24.  
  25. - (Class)defaultExpressionClass;
  26.     // Return [InformixSQLExpression class];
  27. - (Class)adaptorContextClass;
  28.     // Return [InformixContext class];
  29. - (Class)adaptorChannelClass;
  30.     // Return [InformixChannel class];
  31.  
  32. - createAdaptorContext;
  33.     // Returns a new InformixContext, or nil if a new context cannot be
  34.     // created.  InformixAdaptors by default have no contexts at all.
  35.     // The newly created context retains its adaptor.
  36.  
  37. - (NSString *)informixConnectionString;
  38.     // Return the connection string for the first arg of db_connect().
  39. - (NSString *)informixUserName;
  40.     // Return the username in the connection dictionary.
  41. - (NSString *)informixPassword;
  42.     // Return the password in the connection dictionary.
  43. - (NSString *)informixDefaultValue:(NSString *)key;
  44.     // Return the user default setting for the provided key.
  45.  
  46. - (BOOL)isValidQualifierType:(NSString *)typeName model:(EOModel *)model;
  47. - (void)assertConnectionDictionaryIsValid;
  48.  
  49. - (void)informixContextWillConnect:(InformixContext *)logon;
  50. - (void)informixContextDidDisconnect:(InformixContext *)logon;
  51.     // Methods the InformixContext uses to notify the InformixAdaptor of
  52.     // changes.
  53.  
  54. - (NSArray *)connectionKeys;
  55.     // Standard keys for the connection dictionary.
  56.  
  57. - (void)raiseInformixError:(NSString *)sqlString;
  58.     // Extract the error information in the connection structure and use
  59.     // it to build and raise an exception.
  60.  
  61. + (NSDictionary *)externalToInternalTypeMap;
  62.     // This method returns a dictionary that maps each predefined externalType
  63.     // known by the database to a default internal type.
  64. + (NSString *)internalTypeForExternalType:(NSString *)extType model:(EOModel *)model;
  65.     // Return the interntal type ("NSString", "NSDecimalNumber," etc.) for
  66.     // the provided external type ("VARCHAR", "DECIMAL", etc.).
  67. + (NSArray *)externalTypesWithModel:(EOModel *)model;
  68.     // Return an array of available external type names
  69. @end
  70.  
  71.