aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPExportController.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2009-10-26 23:30:09 +0000
committerstuconnolly <stuart02@gmail.com>2009-10-26 23:30:09 +0000
commit332c2308514c1c0fe839dd0124d90cd8d24fd9ef (patch)
tree77f4245d2c9d0f0e47577ef563c57e9902c067a4 /Source/SPExportController.m
parente7b2c58d61b3a815de977d0266749197b03b330c (diff)
downloadsequelpro-332c2308514c1c0fe839dd0124d90cd8d24fd9ef.tar.gz
sequelpro-332c2308514c1c0fe839dd0124d90cd8d24fd9ef.tar.bz2
sequelpro-332c2308514c1c0fe839dd0124d90cd8d24fd9ef.zip
Minor export work.
Diffstat (limited to 'Source/SPExportController.m')
-rw-r--r--Source/SPExportController.m19
1 files changed, 12 insertions, 7 deletions
diff --git a/Source/SPExportController.m b/Source/SPExportController.m
index 19d794ae..d7c0882f 100644
--- a/Source/SPExportController.m
+++ b/Source/SPExportController.m
@@ -34,7 +34,7 @@
@interface SPExportController (PrivateAPI)
- (void)_initializeExportUsingSelectedOptions;
-- (BOOL)_exportTables:(NSArray *)exportTables asType:(SPExportType)type;
+- (BOOL)_exportTables:(NSArray *)exportTables asType:(SPExportType)type toMultipleFiles:(BOOL)multipleFiles;
@end
@@ -53,6 +53,7 @@
tables = [[NSMutableArray alloc] init];
operationQueue = [[NSOperationQueue alloc] init];
+ tableExportMapping = [NSMutableDictionary dictionary];
}
return self;
@@ -336,7 +337,7 @@
break;
case SP_TABLE_EXPORT:
- [self _exportTables:exportTables asType:exportType];
+ [self _exportTables:exportTables asType:exportType toMultipleFiles:[exportFilePerTableCheck state]];
break;
}
}
@@ -345,15 +346,14 @@
* Exports the contents' of the supplied array of tables. Note that this method currently only supports
* exporting in CSV and XML formats.
*/
-- (BOOL)_exportTables:(NSArray *)exportTables asType:(SPExportType)type
+- (BOOL)_exportTables:(NSArray *)exportTables asType:(SPExportType)type toMultipleFiles:(BOOL)multipleFiles
{
NSUInteger i;
NSMutableString *errors = [NSMutableString string];
- NSMutableString *infoString = [NSMutableString string];
NSDictionary *tableDetails;
- NSStringEncoding encoding = [[self connection] encoding];
+ //NSStringEncoding encoding = [[self connection] encoding];
// Reset the interface
[exportProgressTitle setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Exporting %@", @"text showing that the application is importing a supplied format"), @"CSV"]];
@@ -384,12 +384,17 @@
options:NSLiteralSearch
range:NSMakeRange(0, [csvLineEnd length])];
+ NSUInteger tableCount = [exportTables count];
+
+ // If
+ if ((type == SP_CSV_EXPORT) && (!multipleFiles) && (tableCount > 1)) {
+
+ }
+
/*if ([exportTables count] > 1) {
[infoString setString:[NSString stringWithFormat:@"Host: %@ Database: %@ Generation Time: %@%@%@",
[tableDocumentInstance host], [tableDocumentInstance database], [NSDate date], csvLineEnd, csvLineEnd]];
}*/
-
- NSUInteger tableCount = [exportTables count];
// Loop through the tables
for (i = 0 ; i < tableCount; i++)