| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
'componentsJoinedAndBacktickQuoted'
• improved deletion of rows in tables which have no primary keys
- check for duplicated rows first; if no duplicates are found use all columns as 'primary keys' and delete the rows via … WHERE (a='…' AND b='…') OR (a='…' AND b='…') OR …
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
'selectedRowEnumerator'
|
| |
|
| |
|
|
|
|
|
|
| |
• added to SPArrayAdditions.m - (NSArray *)subarrayWithIndexes:(NSIndexSet *)indexes
• added "Copy as SQL INSERT" to MainMenu (not yet activated)
• added to CMCopyTable - (NSString *)selectedRowsAsSqlInserts for copying selectedRows as INSERT INTO ... string (under constructions, up to now it works for strings)
|
| |
|
|
- added a backtickQuotedString: method to SPStringAdditions
- created the file SPArrayAdditions for a componentsJoinedAndBacktickQuoted: method
In the future, we should use backtickQuotedString: to quote identifiers like this:
[NSString stringWithFormat:@"SELECT * FROM %@", [tableName backtickQuotedString]]
|