- Conforms To:
- NSObject
- Declared In:
- RTSQLPlugin.h
- - name
- - loaded
- - loadPlugin
- - dbTypeConstant
- - hostFieldName
- - usesPort
- - defaultPort
- - usesUserid
- - defaultUserid
- - usesPassword
- - usesDatabaseName
- - databaseNameFieldName
- - openConnectionWithParameters:
- - openSession:port:userid:password:dbName:
- - cloneSession:withZone:
- (id <RTSQLSession>)cloneSession:(id<RTSQLSession>)session withZone:(NSZone*)zone
Clones an existing session with the specified zone. Raises an exception if fails.
- (NSString*)databaseNameFieldName
Returns the plugin-specific name of the "databaseName" field. Raises an exception if the plugin is not loaded.
- (FourCharCode)dbTypeConstant
Returns a FourCharCode representing this plugin. Each plugin has a unique code. Raises an exception if the plugin is not loaded.
- (UInt16)defaultPort
If usesPort is YES, returns the default port number. Defaults to zero. Raises an exception if the plugin is not loaded.
- (NSString*)defaultUserid
If usesUserid is YES, returns the default value. Raises an exception if the plugin is not loaded.
- (NSString*)hostFieldName
Returns the plugin-specific name of the "hostname" field. Raises an exception if the plugin is not loaded.
- (BOOL)loadPlugin
Attempts to load/initialize the plugin and returns YES if successful (or if it was already loaded).
- (BOOL)loaded
Returns YES if this plugin is loaded and initialized.
- (NSString*)name
Returns the name of the plugin.
- (id <RTSQLSession>)openConnectionWithParameters:(NSDictionary *)dict
Standard method to open a new database connection. Raises exception if fails. inConnectDict is a dictionary of connection information. The following are the standard keys and values that can be in there. Individual plugins are free to add their own keys for any custom settings, but they should start with a lowercase letter to not conflict with future changes.
| Key | Type | Description |
|---|---|---|
| Standard Keys (all plugins should support connecting with these if possible) | ||
| HostName | NSString* | host to connect to |
| Port | NSNumber*(UInt16) | port to connect to |
| Userid | NSString* | userid to connect as |
| Password | NSString* | password to connect with |
| InitDB | NSString* | catalog/database name to connect to |
| Other Keys | ||
| DBPassword | NSString* | db password (such as with FrontBase) |
- (id <RTSQLSession>)openSession:(NSString*)inHost port:(UInt16)inPort userid:(NSString*)inUserid password:(NSString*)inPassword dbName:(NSString*)inDBName
Opens and returns a new session to the requested server. Raises an exception if fails.
- (BOOL)usesDatabaseName
Returns YES if this plugin accepts a database name as part of connection information. Raises an exception if the plugin is not loaded.
- (BOOL)usesPassword
Returns YES if this plugin accepts a password as part of connection information. Raises an exception if the plugin is not loaded.
- (BOOL)usesPort
Returns YES if this plugin accepts a port number as part of connection information. Raises an exception if the plugin is not loaded.
- (BOOL)usesUserid
Returns YES if this plugin accepts a userid as part of connection information. Raises an exception if the plugin is not loaded.