aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMTextView.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-03-30 09:10:02 +0000
committerBibiko <bibiko@eva.mpg.de>2010-03-30 09:10:02 +0000
commit5fd7c0a6c1f284a261d8e3cabe97db8601e2bd93 (patch)
tree5751ab514cf46a60676246b8ec5f748a88c61cf4 /Source/CMTextView.m
parent2424d968ad5e6d9516b15fead3edf26d0183c450 (diff)
downloadsequelpro-5fd7c0a6c1f284a261d8e3cabe97db8601e2bd93.tar.gz
sequelpro-5fd7c0a6c1f284a261d8e3cabe97db8601e2bd93.tar.bz2
sequelpro-5fd7c0a6c1f284a261d8e3cabe97db8601e2bd93.zip
• some speed improvements and code simplifications for navigator
• avoid making the completion key list unique since it's possible to insert unique items only • added trigger to query db structure after SQL import • some work to avoid http://log.sequelpro.com/view/90 (not yet ideally - WIP)
Diffstat (limited to 'Source/CMTextView.m')
-rw-r--r--Source/CMTextView.m9
1 files changed, 2 insertions, 7 deletions
diff --git a/Source/CMTextView.m b/Source/CMTextView.m
index a4bcda58..2b9879b6 100644
--- a/Source/CMTextView.m
+++ b/Source/CMTextView.m
@@ -314,13 +314,8 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
if(dbs != nil && [dbs isKindOfClass:[NSDictionary class]] && [dbs count]) {
NSMutableArray *allDbs = [NSMutableArray array];
- [allDbs addObjectsFromArray:[dbs allKeys]];
-
- // Add database names having no tables since they don't appear in the information_schema
- if ([[[[self window] delegate] valueForKeyPath:@"tablesListInstance"] valueForKey:@"allDatabaseNames"] != nil)
- for(id db in [[[[self window] delegate] valueForKeyPath:@"tablesListInstance"] valueForKey:@"allDatabaseNames"])
- if(![allDbs containsObject:[NSString stringWithFormat:@"%@%@%@", connectionID, SPUniqueSchemaDelimiter, db]])
- [allDbs addObject:[NSString stringWithFormat:@"%@%@%@", connectionID, SPUniqueSchemaDelimiter, db]];
+ @try { [allDbs addObjectsFromArray:[dbs allKeys]]; }
+ @catch(id ae) { ; }
NSSortDescriptor *desc = [[NSSortDescriptor alloc] initWithKey:nil ascending:YES selector:@selector(localizedCompare:)];
NSMutableArray *sortedDbs = [NSMutableArray array];