diff options
author | rowanbeentje <rowan@beent.je> | 2009-06-24 23:52:47 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-06-24 23:52:47 +0000 |
commit | c118f1a8166d1c612bed66ab64235cab6111a3cd (patch) | |
tree | 2a4e12d348f0c5f67d69d7974ae3481cbe24737a /Source/SPTableData.m | |
parent | 15981eb3fbf5438de932c7b815707f3c6a7f0110 (diff) | |
download | sequelpro-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.m | 7 |
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]; |