diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-03-26 15:14:11 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-03-26 15:14:11 +0000 |
commit | 52309a04b95bc6dea3ead6d1968bd6e17be285bf (patch) | |
tree | 1b2ca1982f9b5c9599e04289d1de2c88a4ba6a60 /Source/TablesList.m | |
parent | 91db43ffddbe3f5476ef3265b57d68c61a8e06c2 (diff) | |
download | sequelpro-52309a04b95bc6dea3ead6d1968bd6e17be285bf.tar.gz sequelpro-52309a04b95bc6dea3ead6d1968bd6e17be285bf.tar.bz2 sequelpro-52309a04b95bc6dea3ead6d1968bd6e17be285bf.zip |
• first steps to ease the structure querying for auto-completion and navigator
- now it accumulates the data and caches them db by db, ie one has to select a db before using its structure for completion and navigator
- next step is to avoid querying info_schema as much as possible
- it will only query the structure if something was changed
- next steps follows as soon as possible
Diffstat (limited to 'Source/TablesList.m')
-rw-r--r-- | Source/TablesList.m | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/TablesList.m b/Source/TablesList.m index 6ef3d315..72448495 100644 --- a/Source/TablesList.m +++ b/Source/TablesList.m @@ -92,7 +92,7 @@ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:tableDocumentInstance]; // Query the structure of all databases in the background (mainly for completion) - [NSThread detachNewThreadSelector:@selector(queryDbStructure) toTarget:mySQLConnection withObject:nil]; + [NSThread detachNewThreadSelector:@selector(queryDbStructureAndForceUpdate:) toTarget:mySQLConnection withObject:nil]; // Select the table list for the current database. On MySQL versions after 5 this will include // views; on MySQL versions >= 5.0.02 select the "full" list to also select the table type column. @@ -1348,7 +1348,7 @@ [tableWindow setTitle:[tableDocumentInstance displaySPName]]; // Query the structure of all databases in the background (mainly for completion) - [NSThread detachNewThreadSelector:@selector(queryDbStructure) toTarget:mySQLConnection withObject:nil]; + [NSThread detachNewThreadSelector:@selector(queryDbStructureAndForceUpdate:) toTarget:mySQLConnection withObject:[NSNumber numberWithBool:YES]]; } #pragma mark - @@ -1928,7 +1928,7 @@ [tablesListView deselectAll:self]; // Query the structure of all databases in the background (mainly for completion) - [NSThread detachNewThreadSelector:@selector(queryDbStructure) toTarget:mySQLConnection withObject:nil]; + [NSThread detachNewThreadSelector:@selector(queryDbStructureAndForceUpdate:) toTarget:mySQLConnection withObject:[NSNumber numberWithBool:YES]]; } @@ -2028,7 +2028,7 @@ [self updateSelectionWithTaskString:[NSString stringWithFormat:NSLocalizedString(@"Loading %@...", @"Loading table task string"), selectedTableName]]; // Query the structure of all databases in the background (mainly for completion) - [NSThread detachNewThreadSelector:@selector(queryDbStructure) toTarget:mySQLConnection withObject:nil]; + [NSThread detachNewThreadSelector:@selector(queryDbStructureAndForceUpdate:) toTarget:mySQLConnection withObject:[NSNumber numberWithBool:YES]]; } else { @@ -2222,7 +2222,7 @@ [self updateSelectionWithTaskString:[NSString stringWithFormat:NSLocalizedString(@"Loading %@...", @"Loading table task string"), selectedTableName]]; // Query the structure of all databases in the background (mainly for completion) - [NSThread detachNewThreadSelector:@selector(queryDbStructure) toTarget:mySQLConnection withObject:nil]; + [NSThread detachNewThreadSelector:@selector(queryDbStructureAndForceUpdate:) toTarget:mySQLConnection withObject:[NSNumber numberWithBool:YES]]; } } |