aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTextView.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPTextView.m')
-rw-r--r--Source/SPTextView.m11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/SPTextView.m b/Source/SPTextView.m
index b3db1b30..73e45c88 100644
--- a/Source/SPTextView.m
+++ b/Source/SPTextView.m
@@ -37,6 +37,7 @@
#import "SPDatabaseViewController.h"
#import "SPAppController.h"
#import "SPMySQL.h"
+#import "SPDatabaseStructure.h"
#pragma mark -
#pragma mark lex init
@@ -825,7 +826,7 @@ NSInteger _alphabeticSort(id string1, id string2, void *reverse)
NSString *theDb = (dbName == nil) ? [NSString stringWithString:currentDb] : [NSString stringWithString:dbName];
NSString *connectionID = [tableDocumentInstance connectionID];
NSString *conID = [NSString stringWithFormat:@"%@%@%@", connectionID, SPUniqueSchemaDelimiter, theDb];
- NSDictionary *dbs = [NSDictionary dictionaryWithDictionary:[[mySQLConnection getDbStructure] objectForKey:connectionID]];
+ NSDictionary *dbs = [NSDictionary dictionaryWithDictionary:[[[tableDocumentInstance databaseStructureRetrieval] structure] objectForKey:connectionID]];
if(theDb && dbs != nil && [dbs count] && [dbs objectForKey:conID] && [[dbs objectForKey:conID] isKindOfClass:[NSDictionary class]]) {
NSArray *allTables = [[dbs objectForKey:conID] allKeys];
// Check if found table name is known, if not parse for aliases
@@ -887,7 +888,7 @@ NSInteger _alphabeticSort(id string1, id string2, void *reverse)
autoComplete:autoCompleteMode
oneColumn:isDictMode
alias:alias
- isQueryingDBStructure:[mySQLConnection isQueryingDatabaseStructure]];
+ withDBStructureRetriever:[tableDocumentInstance databaseStructureRetrieval]];
completionParseRangeLocation = parseRange.location;
@@ -1452,7 +1453,7 @@ NSInteger _alphabeticSort(id string1, id string2, void *reverse)
if (tablesListInstance && [tablesListInstance tableName])
currentTable = [tablesListInstance tableName];
- NSDictionary *dbs = [NSDictionary dictionaryWithDictionary:[[mySQLConnection getDbStructure] objectForKey:connectionID]];
+ NSDictionary *dbs = [NSDictionary dictionaryWithDictionary:[[[tableDocumentInstance databaseStructureRetrieval] structure] objectForKey:connectionID]];
if(currentDb != nil && currentTable != nil && dbs != nil && [dbs count] && [dbs objectForKey:currentDb] && [[dbs objectForKey:currentDb] objectForKey:currentTable]) {
NSDictionary * theTable = [[dbs objectForKey:currentDb] objectForKey:currentTable];
NSArray *allFields = [theTable allKeys];
@@ -1524,7 +1525,7 @@ NSInteger _alphabeticSort(id string1, id string2, void *reverse)
autoComplete:NO
oneColumn:NO
alias:nil
- isQueryingDBStructure:NO];
+ withDBStructureRetriever:nil];
//Get the NSPoint of the first character of the current word
NSRange glyphRange = [[self layoutManager] glyphRangeForCharacterRange:NSMakeRange(aRange.location,1) actualCharacterRange:NULL];
@@ -1681,7 +1682,7 @@ NSInteger _alphabeticSort(id string1, id string2, void *reverse)
autoComplete:NO
oneColumn:YES
alias:nil
- isQueryingDBStructure:NO];
+ withDBStructureRetriever:nil];
//Get the NSPoint of the first character of the current word
NSRange glyphRange = [[self layoutManager] glyphRangeForCharacterRange:NSMakeRange(r2.location,1) actualCharacterRange:NULL];