From a5177fe6ec1107f97c326982a77100324532ccc0 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Fri, 23 Oct 2009 23:35:58 +0000 Subject: - Apply new document task support to the Custom Query tab, and run all custom queries in a background thread with the task interface active. - Rework custom query result processing to allow display of results as they come in - Fix a memory leak --- Source/CustomQuery.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Source/CustomQuery.h') diff --git a/Source/CustomQuery.h b/Source/CustomQuery.h index a9d4f670..374cfc0d 100644 --- a/Source/CustomQuery.h +++ b/Source/CustomQuery.h @@ -82,6 +82,7 @@ IBOutlet id multipleLineEditingButton; IBOutlet NSMenuItem *runSelectionMenuItem; + IBOutlet NSMenuItem *runAllMenuItem; IBOutlet NSMenuItem *clearHistoryMenuItem; IBOutlet NSMenuItem *shiftLeftMenuItem; IBOutlet NSMenuItem *shiftRightMenuItem; @@ -109,8 +110,11 @@ NSString *usedQuery; NSRange currentQueryRange; NSArray *currentQueryRanges; + NSRange oldThreadedQueryRange; BOOL hasBackgroundAttribute; + BOOL selectionButtonCanBeEnabled; NSString *mySQLversion; + NSTableColumn *sortColumn; int queryStartPosition; @@ -119,6 +123,7 @@ NSString *helpHTMLTemplate; NSMutableArray *fullResult; + NSInteger fullResultCount; NSArray *cqColumnDefinition; NSString *lastExecutedQuery; @@ -135,6 +140,7 @@ // IBAction methods - (IBAction)runAllQueries:(id)sender; +- (void) runAllQueriesCallback; - (IBAction)runSelectedQueries:(id)sender; - (IBAction)chooseQueryFavorite:(id)sender; - (IBAction)chooseQueryHistory:(id)sender; @@ -153,7 +159,8 @@ - (IBAction)filterQueryHistory:(id)sender; // Query actions -- (void)performQueries:(NSArray *)queries; +- (void)performQueries:(NSArray *)queries withCallback:(SEL)customQueryCallbackMethod; +- (void)performQueriesTask:(NSDictionary *)taskArguments; - (NSString *)queryAtPosition:(long)position lookBehind:(BOOL *)doLookBehind; - (NSRange)queryRangeAtPosition:(long)position lookBehind:(BOOL *)doLookBehind; - (NSRange)queryTextRangeForQuery:(int)anIndex startPosition:(long)position; @@ -170,6 +177,10 @@ - (NSWindow *)helpWebViewWindow; - (void)setMySQLversion:(NSString *)theVersion; +// Task interaction +- (void) startDocumentTaskForTab:(NSNotification *)aNotification; +- (void) endDocumentTaskForTab:(NSNotification *)aNotification; + // Other - (void)setConnection:(MCPConnection *)theConnection; - (void)doPerformQueryService:(NSString *)query; -- cgit v1.2.3