aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableData.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-06-24 23:52:47 +0000
committerrowanbeentje <rowan@beent.je>2009-06-24 23:52:47 +0000
commitc118f1a8166d1c612bed66ab64235cab6111a3cd (patch)
tree2a4e12d348f0c5f67d69d7974ae3481cbe24737a /Source/SPTableData.m
parent15981eb3fbf5438de932c7b815707f3c6a7f0110 (diff)
downloadsequelpro-c118f1a8166d1c612bed66ab64235cab6111a3cd.tar.gz
sequelpro-c118f1a8166d1c612bed66ab64235cab6111a3cd.tar.bz2
sequelpro-c118f1a8166d1c612bed66ab64235cab6111a3cd.zip
- Make changes to the table structure flush the appropriate table data caches
- SPTableData's columnWithName: now updates caches as necessary to avoid issues - Mark the extended table info view (particularly the CREATE TABLE syntax) as requiring update following table structure changes
Diffstat (limited to 'Source/SPTableData.m')
-rw-r--r--Source/SPTableData.m7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/SPTableData.m b/Source/SPTableData.m
index 0358e984..e348ac79 100644
--- a/Source/SPTableData.m
+++ b/Source/SPTableData.m
@@ -122,6 +122,13 @@
*/
- (NSDictionary *) columnWithName:(NSString *)colName
{
+ if ([columns count] == 0) {
+ if ([tableListInstance tableType] == SP_TABLETYPE_VIEW) {
+ [self updateInformationForCurrentView];
+ } else {
+ [self updateInformationForCurrentTable];
+ }
+ }
int columnIndex = [columnNames indexOfObject:colName];
if (columnIndex == NSNotFound) return nil;
return [columns objectAtIndex:columnIndex];