aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPCSVExporter.h
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-05-24 18:07:43 +0000
committerstuconnolly <stuart02@gmail.com>2010-05-24 18:07:43 +0000
commitbbe0f861dd4e3ab99aa3d555d3fc5db5ee5ae39d (patch)
tree1cf7d41f091854e8e2288946684267ce0f8ceaf4 /Source/SPCSVExporter.h
parentd48005bd9b34f2fb1afd31f7487b7bbf8b9b978f (diff)
downloadsequelpro-bbe0f861dd4e3ab99aa3d555d3fc5db5ee5ae39d.tar.gz
sequelpro-bbe0f861dd4e3ab99aa3d555d3fc5db5ee5ae39d.tar.bz2
sequelpro-bbe0f861dd4e3ab99aa3d555d3fc5db5ee5ae39d.zip
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.
Diffstat (limited to 'Source/SPCSVExporter.h')
-rw-r--r--Source/SPCSVExporter.h89
1 files changed, 74 insertions, 15 deletions
diff --git a/Source/SPCSVExporter.h b/Source/SPCSVExporter.h
index 5c78be04..b0c6c46b 100644
--- a/Source/SPCSVExporter.h
+++ b/Source/SPCSVExporter.h
@@ -25,34 +25,93 @@
#import <Cocoa/Cocoa.h>
-#import "MCPKit.h"
#import "SPExporter.h"
+#import "SPCSVExporterProtocol.h"
+@class SPTableData;
+
+/**
+ * @class SPCSVExporter SPCSVExporter.m
+ *
+ * @author Stuart Connolly http://stuconnolly.com/
+ *
+ * CSV exporter class.
+ */
@interface SPCSVExporter : SPExporter
-{
- // CSV data
+{
+ /**
+ * Exporter delegate
+ */
+ NSObject <SPCSVExporterProtocol> *delegate;
+
+ /**
+ * Data array
+ */
NSArray *csvDataArray;
- MCPStreamingResult *csvDataResult;
- // CSV options
+ /**
+ * Table name
+ */
+ NSString *csvTableName;
+
+ /**
+ * Output field names
+ */
BOOL csvOutputFieldNames;
+
+ /**
+ * CSV field separator string
+ */
NSString *csvFieldSeparatorString;
+
+ /**
+ * CSV enclosing character string
+ */
NSString *csvEnclosingCharacterString;
+
+ /**
+ * CSV escape string
+ */
NSString *csvEscapeString;
+
+ /**
+ * CSV line ending string
+ */
NSString *csvLineEndingString;
+
+ /**
+ * CSV NULL string
+ */
NSString *csvNULLString;
- NSArray *csvTableColumnNumericStatus;
+
+ /**
+ * Table data
+ */
+ SPTableData *csvTableData;
}
-@property (readwrite, retain) NSArray *csvDataArray;
-@property (readwrite, retain) MCPStreamingResult *csvDataResult;
+@property(readwrite, assign) NSObject <SPCSVExporterProtocol> *delegate;
+
+@property(readwrite, retain) NSArray *csvDataArray;
+@property(readwrite, retain) NSString *csvTableName;
+
+@property(readwrite, assign) BOOL csvOutputFieldNames;
+
+@property(readwrite, retain) NSString *csvFieldSeparatorString;
+@property(readwrite, retain) NSString *csvEnclosingCharacterString;
+@property(readwrite, retain) NSString *csvEscapeString;
+@property(readwrite, retain) NSString *csvLineEndingString;
+@property(readwrite, retain) NSString *csvNULLString;
+
+@property(readwrite, retain) SPTableData *csvTableData;
-@property (readwrite, assign) BOOL csvOutputFieldNames;
-@property (readwrite, retain) NSString *csvFieldSeparatorString;
-@property (readwrite, retain) NSString *csvEnclosingCharacterString;
-@property (readwrite, retain) NSString *csvEscapeString;
-@property (readwrite, retain) NSString *csvLineEndingString;
-@property (readwrite, retain) NSString *csvNULLString;
-@property (readwrite, retain) NSArray *csvTableColumnNumericStatus;
+/**
+ * Initialise an instance of SPCSVExporter using the supplied delegate.
+ *
+ * @param exportDelegate The exporter delegate
+ *
+ * @return The initialised instance
+ */
+- (id)initWithDelegate:(NSObject *)exportDelegate;
@end