| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
relationship, remove the key before the field to prevent an error. Obviously warn the user that the key is being dropped as well. Fixes issue #462.
This check also needs to be implemented when removing indexes as foreign keys depend on the presence of indexes to prevent table scans.
Something to be discussed, the display of foreign keys that are made up of multiple fields in the relations table and link arrows in the content table.
|
|
|
|
|
|
|
| |
'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]]
|