aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CustomQuery.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-04-28 15:20:15 +0000
committerBibiko <bibiko@eva.mpg.de>2009-04-28 15:20:15 +0000
commit38b05838737d41d752f13164c1bda8bca7ca4ca4 (patch)
tree5a141fa50a0e532dbb8aedb5bc1c83575abd09a6 /Source/CustomQuery.m
parent86b0a94eab63cf4b0835f620a9902bee26c3853c (diff)
downloadsequelpro-38b05838737d41d752f13164c1bda8bca7ca4ca4.tar.gz
sequelpro-38b05838737d41d752f13164c1bda8bca7ca4ca4.tar.bz2
sequelpro-38b05838737d41d752f13164c1bda8bca7ca4ca4.zip
• MySQL Help
- fixed logic to detect whether db connection supports HELP statement - improved the while typing search, e.g. type in the Help search field "sel"
Diffstat (limited to 'Source/CustomQuery.m')
-rw-r--r--Source/CustomQuery.m10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m
index 6064c979..ed3486dc 100644
--- a/Source/CustomQuery.m
+++ b/Source/CustomQuery.m
@@ -1390,6 +1390,8 @@ traps enter key and
helpTarget = 2; // set default to search in MySQL help
[self helpTargetValidation];
}
+ if([helpString isEqualToString:@"__no_help_available"])
+ [helpWebViewWindow close];
if(![helpString length]) return;
@@ -1588,7 +1590,7 @@ traps enter key and
];
theResult = [mySQLConnection queryString:[NSString stringWithFormat:@"HELP '%@'", aString]];
- if ( ![[mySQLConnection getLastErrorMessage] isEqualToString:@""] || ![theResult numOfRows])
+ if ( ![[mySQLConnection getLastErrorMessage] isEqualToString:@""])
{
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:
[[NSString stringWithFormat:
@@ -1598,7 +1600,11 @@ traps enter key and
stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]]];
return @"__no_help_available";
}
-
+ if(![theResult numOfRows]) {
+ theResult = [mySQLConnection queryString:[NSString stringWithFormat:@"HELP '%@%%'", aString]];
+ if(![theResult numOfRows])
+ return @"";
+ }
tableDetails = [[NSDictionary alloc] initWithDictionary:[theResult fetchRowAsDictionary]];
if ([tableDetails objectForKey:@"description"]) { // one single help topic found