From bbe0f861dd4e3ab99aa3d555d3fc5db5ee5ae39d Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Mon, 24 May 2010 18:07:43 +0000 Subject: Merge export redesign branch back into trunk. Includes a completely redesign approach to all export data types based on the use of NSOperation subclasses. CSV, SQL, XML and dot export types are currently functional, while the source files for PDF and HTML export types exist they are to be implemented, but are currently hidden from the interface. Also includes the following: - Completely redesigned export interface. - The ability to customize CSV NULL values. - The ability to specify whether the UTF-8 BOM should be used in SQL dumps. - The ability to specify whether BLOB fields are output as hex or plain text during SQL dumps. Defaults to hex. - Exporting currently selected tables via the tables list context menu. Outstanding issues: - Not all progress indicators for all export types are functional (or functioning correctly). - A few issues related to the introduction of only exporting the content and create and drop syntax of specific tables during SQL dumps. Needs some serious testing and benchmarking to ensure it replicates the current export functionality. --- Source/SPConstants.h | 39 +++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) (limited to 'Source/SPConstants.h') diff --git a/Source/SPConstants.h b/Source/SPConstants.h index d893b825..1fdcf68a 100644 --- a/Source/SPConstants.h +++ b/Source/SPConstants.h @@ -36,24 +36,46 @@ typedef enum { } SPViewMode; // Query modes -typedef enum { +enum { SPInterfaceQueryMode = 0, SPCustomQueryQueryMode = 1, SPImportExportQueryMode = 2 -} SPQueryMode; +}; +typedef NSUInteger SPQueryMode; // Connection types -typedef enum { +enum { SPTCPIPConnection = 0, SPSocketConnection = 1, SPSSHTunnelConnection = 2 -} SPConnectionType; +}; +typedef NSUInteger SPConnectionType; + +// Export type constants +enum { + SPSQLExport = 1, + SPCSVExport = 2, + SPXMLExport = 3, + SPPDFExport = 4, + SPHTMLExport = 5, + SPExcelExport = 6, + SPDotExport = 7 +}; +typedef NSUInteger SPExportType; + +// Export source constants +enum { + SPFilteredExport = 1, + SPQueryExport = 2, + SPTableExport = 3 +}; +typedef NSUInteger SPExportSource; // Table row count query usage levels typedef enum { - SPRowCountFetchNever = 0, - SPRowCountFetchIfCheap = 1, - SPRowCountFetchAlways = 2 + SPRowCountFetchNever = 0, + SPRowCountFetchIfCheap = 1, + SPRowCountFetchAlways = 2 } SPRowCountQueryUsageLevels; // Export type @@ -246,6 +268,7 @@ extern NSString *SPCSVImportFirstLineIsHeader; extern NSString *SPCSVFieldImportMappingAlignment; extern NSString *SPImportClipboardTempFileNamePrefix; extern NSString *SPSQLExportUseCompression; +extern NSString *SPNoBOMforSQLdumpFile; // Misc extern NSString *SPContentFilters; @@ -253,7 +276,6 @@ extern NSString *SPDocumentTaskEndNotification; extern NSString *SPDocumentTaskStartNotification; extern NSString *SPFieldEditorSheetFont; extern NSString *SPLastSQLFileEncoding; -extern NSString *SPNoBOMforSQLdumpFile; extern NSString *SPPrintBackground; extern NSString *SPPrintImagePreviews; extern NSString *SPQueryFavorites; @@ -273,6 +295,7 @@ extern NSString *SPDocumentationURL; extern NSString *SPContactURL; extern NSString *SPKeyboardShortcutsURL; extern NSString *SPMySQLSearchURL; +extern NSString *SPDevURL; extern NSString *SPGettingConnectedDocURL; // Toolbar constants -- cgit v1.2.3