aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPSQLExporter.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/SPSQLExporter.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/SPSQLExporter.h')
-rw-r--r--Source/SPSQLExporter.h100
1 files changed, 100 insertions, 0 deletions
diff --git a/Source/SPSQLExporter.h b/Source/SPSQLExporter.h
index 7a2e9006..6b4702ce 100644
--- a/Source/SPSQLExporter.h
+++ b/Source/SPSQLExporter.h
@@ -26,7 +26,107 @@
#import <Cocoa/Cocoa.h>
#import "SPExporter.h"
+#import "SPSQLExporterProtocol.h"
+/**
+ * @class SPSQLExporter SPSQLExporter.m
+ *
+ * @author Stuart Connolly http://stuconnolly.com/
+ *
+ * SQL exporter class.
+ */
@interface SPSQLExporter : SPExporter
+{
+ NSObject <SPSQLExporterProtocol> *delegate;
+
+ /**
+ * Tables
+ */
+ NSArray *sqlExportTables;
+
+ /**
+ * Database host
+ */
+ NSString *sqlDatabaseHost;
+
+ /**
+ * Database name
+ */
+ NSString *sqlDatabaseName;
+
+ /**
+ * Database version
+ */
+ NSString *sqlDatabaseVersion;
+
+ /**
+ * Current table
+ */
+ NSString *sqlExportCurrentTable;
+
+ /**
+ * Export errors
+ */
+ NSString *sqlExportErrors;
+
+ /**
+ * Include UTF-8 BOM
+ */
+ BOOL sqlOutputIncludeUTF8BOM;
+
+ /**
+ * Encode BLOB fields as Hex data
+ */
+ BOOL sqlOutputEncodeBLOBasHex;
+
+ /**
+ * Include export errors
+ */
+ BOOL sqlOutputIncludeErrors;
+
+ /**
+ * Compress output
+ */
+ BOOL sqlOutputCompressFile;
+
+ /**
+ * Table information
+ */
+ NSDictionary *sqlTableInformation;
+}
+
+@property(readwrite, assign) NSObject *delegate;
+
+@property(readwrite, retain) NSArray *sqlExportTables;
+
+@property(readwrite, retain) NSString *sqlDatabaseHost;
+@property(readwrite, retain) NSString *sqlDatabaseName;
+@property(readwrite, retain) NSString *sqlDatabaseVersion;
+
+@property(readwrite, retain) NSString *sqlExportCurrentTable;
+@property(readwrite, retain) NSString *sqlExportErrors;
+
+@property(readwrite, assign) BOOL sqlOutputIncludeUTF8BOM;
+@property(readwrite, assign) BOOL sqlOutputEncodeBLOBasHex;
+@property(readwrite, assign) BOOL sqlOutputIncludeErrors;
+@property(readwrite, assign) BOOL sqlOutputCompressFile;
+
+@property (readwrite, retain) NSDictionary *sqlTableInformation;
+
+/**
+ * Initialise an instance of SPSQLExporter using the supplied delegate.
+ *
+ * @param exportDelegate The exporter delegate
+ *
+ * @return The initialised instance
+ */
+- (id)initWithDelegate:(NSObject *)exportDelegate;
+
+/**
+ * Returns whether or not any export errors occurred.
+ *
+ * @return A BOOL indicating the occurrence of errors
+ */
+- (BOOL)didExportErrorsOccur;
@end