diff options
author | stuconnolly <stuart02@gmail.com> | 2012-04-16 20:16:52 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2012-04-16 20:16:52 +0000 |
commit | 4cad6f0e6e4fb497b480256c2abe3de34ebf225c (patch) | |
tree | b66d6a72a1537cf98624acf3c685f1a4d916fd86 /Source/SPExportInitializer.m | |
parent | 0d3b69f964a8d9d93ca794d457b461463f1ec95d (diff) | |
download | sequelpro-4cad6f0e6e4fb497b480256c2abe3de34ebf225c.tar.gz sequelpro-4cad6f0e6e4fb497b480256c2abe3de34ebf225c.tar.bz2 sequelpro-4cad6f0e6e4fb497b480256c2abe3de34ebf225c.zip |
Bring outline view branch up to date with trunk.
Diffstat (limited to 'Source/SPExportInitializer.m')
-rw-r--r-- | Source/SPExportInitializer.m | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/SPExportInitializer.m b/Source/SPExportInitializer.m index 69a282b4..a0c0ef41 100644 --- a/Source/SPExportInitializer.m +++ b/Source/SPExportInitializer.m @@ -25,13 +25,13 @@ #import "SPExportInitializer.h" #import "SPTableData.h" +#import "SPTableContent.h" #import "SPDatabaseDocument.h" #import "SPTablesList.h" #import "SPGrowlController.h" #import "SPDatabaseDocument.h" #import "SPCustomQuery.h" #import "SPAlertSheets.h" - #import "SPCSVExporter.h" #import "SPSQLExporter.h" #import "SPXMLExporter.h" @@ -41,7 +41,8 @@ #import "SPExportFileUtilities.h" #import "SPExportFilenameUtilities.h" #import "SPExportFileNameTokenObject.h" -#import "SPMySQL.h" + +#import <SPMySQL/SPMySQL.h> @implementation SPExportController (SPExportInitializer) @@ -97,10 +98,10 @@ switch (exportSource) { case SPFilteredExport: - dataArray = [tableContentInstance currentResult]; + dataArray = [tableContentInstance currentDataResultWithNULLs:YES hideBLOBs:NO]; break; case SPQueryExport: - dataArray = [customQueryInstance currentResult]; + dataArray = [customQueryInstance currentDataResultWithNULLs:YES truncateDataFields:NO]; break; case SPTableExport: // Create an array of tables to export @@ -210,9 +211,10 @@ // export, create the single file now and assign it to all subsequently created exporters. if ((![self exportToMultipleFiles]) || (exportSource == SPFilteredExport) || (exportSource == SPQueryExport)) { NSString *selectedTableName = nil; + if (exportSource == SPTableExport && [exportTables count] == 1) selectedTableName = [exportTables objectAtIndex:0]; - [exportFilename setString:(createCustomFilename) ? [self expandCustomFilenameFormatUsingTableName:selectedTableName] : [self generateDefaultExportFilename]]; + [exportFilename setString:createCustomFilename ? [self expandCustomFilenameFormatUsingTableName:selectedTableName] : [self generateDefaultExportFilename]]; // Only append the extension if necessary if (![[exportFilename pathExtension] length]) { |