diff options
author | Bibiko <bibiko@eva.mpg.de> | 2009-10-16 16:46:41 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2009-10-16 16:46:41 +0000 |
commit | 967579ef1225a134c50a686ee7caa9a3b5e293f3 (patch) | |
tree | 11470982216c5f9579c26bfa07815b73a081e0f5 /Source/SPTableData.h | |
parent | 507d0089c6bb73a01129f1e356d1e88ca53afb55 (diff) | |
download | sequelpro-967579ef1225a134c50a686ee7caa9a3b5e293f3.tar.gz sequelpro-967579ef1225a134c50a686ee7caa9a3b5e293f3.tar.bz2 sequelpro-967579ef1225a134c50a686ee7caa9a3b5e293f3.zip |
• fixed SPArrayAdditions method 'componentsJoinedByCommas' to use a mutable string to avoid crashes if array has a very large number of items (malloc error due to reassigning a NSString pointer)
• added to SPTableData method - (NSArray *) primaryKeyColumnNames
- returns all column names which are set as PRIMARY KEYs
- return nil if no PRIMARY KEY is set
• improved the deletion of rows
- if current table has only one PRIMARY KEY field delete all rows via DELETE FROM table WHERE pri_key IN (…) whereby the deletion query will be splitted into 256k chunks
Note: line 1790ff
It has to be implemented a workaround for tables with more than one PRIMARY KEY – maybe via DELETE FROM table WHERE ( (pri_key1='…' AND pri_key2='…') OR (… AND …) OR … ) splitted in 256k chunks as well
Diffstat (limited to 'Source/SPTableData.h')
-rw-r--r-- | Source/SPTableData.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/SPTableData.h b/Source/SPTableData.h index 4df13719..928d2b54 100644 --- a/Source/SPTableData.h +++ b/Source/SPTableData.h @@ -62,5 +62,7 @@ - (NSDictionary *) informationForView:(NSString *)viewName; - (BOOL) updateStatusInformationForCurrentTable; - (NSDictionary *) parseFieldDefinitionStringParts:(NSArray *)definitionParts; +- (NSArray *) primaryKeyColumnNames; + @end |