aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableSource.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-03-26 15:14:11 +0000
committerBibiko <bibiko@eva.mpg.de>2010-03-26 15:14:11 +0000
commit52309a04b95bc6dea3ead6d1968bd6e17be285bf (patch)
tree1b2ca1982f9b5c9599e04289d1de2c88a4ba6a60 /Source/TableSource.m
parent91db43ffddbe3f5476ef3265b57d68c61a8e06c2 (diff)
downloadsequelpro-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/TableSource.m')
-rw-r--r--Source/TableSource.m9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/TableSource.m b/Source/TableSource.m
index 0358f821..e50f7021 100644
--- a/Source/TableSource.m
+++ b/Source/TableSource.m
@@ -193,6 +193,7 @@
// Send the query finished/work complete notification
[[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:tableDocumentInstance];
+
}
/**
@@ -202,6 +203,10 @@
{
[tableDataInstance resetAllData];
[tablesListInstance setStatusRequiresReload:YES];
+
+ // Query the structure of all databases in the background (mainly for completion)
+ [NSThread detachNewThreadSelector:@selector(queryDbStructureAndForceUpdate:) toTarget:mySQLConnection withObject:[NSNumber numberWithBool:YES]];
+
[self loadTable:selectedTable];
}
@@ -859,7 +864,7 @@ closes the keySheet
[tablesListInstance setContentRequiresReload:YES];
// 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]];
return YES;
}
@@ -1066,7 +1071,7 @@ closes the keySheet
if ([NSThread isMainThread]) {
[NSThread detachNewThreadSelector:@selector(_removeIndexAndForeignKey:) toTarget:self withObject:removeKey];
- [tableDocumentInstance enableTaskCancellationWithTitle:NSLocalizedString(@"Cancel", @"cancel button") callbackObject:self callbackFunction:NULL];
+ [tableDocumentInstance enableTaskCancellationWithTitle:NSLocalizedString(@"Cancel", @"cancel button") callbackObject:self callbackFunction:NULL];
}
else {
[self _removeIndexAndForeignKey:removeKey];