diff options
author | Bibiko <bibiko@eva.mpg.de> | 2009-06-07 21:40:06 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2009-06-07 21:40:06 +0000 |
commit | da1616e9c31fd922fef7ed567a28dfdd788bcb0c (patch) | |
tree | b2f1fb8a59bbcb7422838feae04b9c5327446ee0 /Source/CMCopyTable.m | |
parent | 7ce154492f0e307644b66a3d2410a255345d86db (diff) | |
download | sequelpro-da1616e9c31fd922fef7ed567a28dfdd788bcb0c.tar.gz sequelpro-da1616e9c31fd922fef7ed567a28dfdd788bcb0c.tar.bz2 sequelpro-da1616e9c31fd922fef7ed567a28dfdd788bcb0c.zip |
• improved "Copy as SQL INSERT" (still hidden)
• disabled "Copy with Column Names" if Custom Query editor is active
Diffstat (limited to 'Source/CMCopyTable.m')
-rw-r--r-- | Source/CMCopyTable.m | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/CMCopyTable.m b/Source/CMCopyTable.m index ed1e5439..7bb66da7 100644 --- a/Source/CMCopyTable.m +++ b/Source/CMCopyTable.m @@ -189,7 +189,7 @@ int MENU_EDIT_COPY_AS_SQL = 2002; } [result appendString:[NSString stringWithFormat:@"INSERT INTO `%@` (%@)\nVALUES\n", - @"<table>", [tbHeader componentsJoinedAndBacktickQuoted]]]; + (selectedTable == nil)?@"<table>":selectedTable, [tbHeader componentsJoinedAndBacktickQuoted]]]; int c; id rowData = nil; @@ -310,9 +310,10 @@ int MENU_EDIT_COPY_AS_SQL = 2002; } } -- (void)setColumnDefinitions:(NSArray *)columnDefs +- (void)setTableInfoWithColumns:(NSArray *)columnDefs withTable:(NSString *)aTable { columnDefinitions = [[NSArray arrayWithArray:columnDefs] retain]; + selectedTable = aTable; } @end |