- Inherits From:
- NSObject
- Conforms To:
- RTSQLDataSource
- NSCoding
- Declared In:
- RTQueryDataSource.h
- - updateColumnTitles
- - setUpdateColumnTitles:
- - addRemoveColumns
- - setAddRemoveColumns:
- - displayErrors
- - setDisplayErrors:
- - autoPerformQuery
- - setAutoPerformQuery:
- - sortingEnabled
- - setSortingEnabled:
- - loadDataOnAwake
- - setLoadDataOnAwake:
- - queryString
- - setQueryString:
- - setQueryStringNoExecute:
- - tableView
- - setTableView:
- - database
- - setDatabase:
- - databaseName
- - setDatabaseName:
- - session
- - setSession:
- - initializeSession:
- - performQuery:
- - resultSet
- (BOOL)addRemoveColumns
If YES, the columns in the tableView will be removed when the query is performed and replaced with a new column for each column in the result set.
- (BOOL)autoPerformQuery
If YES, the query will be performed when the tableView asks for data.
- (id <RTSQLDatabase>)database
Returns the database queried by this data source.
- (NSString*)databaseName
Returns the name of the database queried by this data source.
- (BOOL)displayErrors
If YES, the user will be shown a sheet or alert with any error messages returned from the server.
- (IBAction)initializeSession:(id)sender
If the session is not already open, asks the archived session to open a session.
- (BOOL)loadDataOnAwake
If YES, the query will be performed when the awakeFromNib message is received.
- (IBAction)performQuery:(id)sender
Performs the query in queryString and sends a reloadData message to the tableView.
- (NSString*)queryString
Returns the query used to populate this data source.
- (id <RTSQLResultSet>)resultSet
Allows other interested parties to access the result set
- (id <RTSQLSession>)session
Returns the session used by this data source.
- (void)setAddRemoveColumns:(BOOL)val
If YES, the columns in the tableView will be removed when the query is performed and replaced with a new column for each column in the result set.
- (void)setAutoPerformQuery:(BOOL)val
If YES, the query will be performed when the tableView asks for data.
- (void)setDatabase:(id <RTSQLDatabase>)inDatabase
Sets the database queried by this data source.
- (void)setDatabaseName:(NSString*)inName
Sets the name of the database queried by this data source.
- (void)setDisplayErrors:(BOOL)display
If YES, the user will be shown a sheet or alert with any error messages returned from the server.
- (void)setLoadDataOnAwake:(BOOL)val
If YES, the query will be performed when the awakeFromNib message is received.
- (void)setQueryString:(NSString*)inQuery
Sets the query used to populate this data source.
- (void)setQueryStringNoExecute:(NSString*)inQuery
Sets the query used to populate this data source without executing the query.
- (void)setSession:(id <RTSQLSession>)inSession
Sets the session used by this data source.
- (void)setSortingEnabled:(BOOL)val
If YES, the user can click on column titles to sort the data by that column.
- (void)setTableView:(NSTableView*)inView
Sets the NSTableView managed by this data source.
- (void)setUpdateColumnTitles:(BOOL)val
If set to YES, the titles of the tableView's columns will be updated with the names of the columns in the database.
- (BOOL)sortingEnabled
If YES, the user can click on column titles to sort the data by that column.
- (NSTableView*)tableView
Returns the NSTableView managed by this data source.
- (BOOL)updateColumnTitles
Returns YES if the titles of the tableView's columns will be updated with the names of the columns in the database.
RTQueryDataSource posts the following notifications to interested observers.
This notification object contains the RTQueryDataSource as the notification object. It is posted when an error happens while performing the query. The userInfo dictionary will have the actual reason under the key "Reason".