diff options
author | rowanbeentje <rowan@beent.je> | 2010-08-26 01:22:52 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-08-26 01:22:52 +0000 |
commit | 91c2f021d4a8e323872cc733becbdfc19870ceb7 (patch) | |
tree | fb858ab649014c78aaca1512029b20713e8a450e /Source/SPExportFile.m | |
parent | dc9d005f21b3e281294f61d4d8e49d0ad003e8fb (diff) | |
download | sequelpro-91c2f021d4a8e323872cc733becbdfc19870ceb7.tar.gz sequelpro-91c2f021d4a8e323872cc733becbdfc19870ceb7.tar.bz2 sequelpro-91c2f021d4a8e323872cc733becbdfc19870ceb7.zip |
Exporter:
- Enable alternating table lines in the export table view - this addresses Issue #797
- Reconnect GZIp & BZIP2 compression functionality (TODO: not currently working for file overwrites; to be discussed)
Diffstat (limited to 'Source/SPExportFile.m')
-rw-r--r-- | Source/SPExportFile.m | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/SPExportFile.m b/Source/SPExportFile.m index e102b28e..1f09157f 100644 --- a/Source/SPExportFile.m +++ b/Source/SPExportFile.m @@ -168,6 +168,22 @@ return exportFileHandleStatus; } +/** + * Sets the compression level on the newly created file. Throws an exception + * if attempting to set the compression level when no file handle exists. + * + * @param fileCompressionFormat The compression level to support, from the SPFileCompressionFormat enum. + */ +- (void)setCompressionFormat:(SPFileCompressionFormat)fileCompressionFormat +{ + if (![self exportFileHandle]) { + [NSException raise:NSInternalInconsistencyException format:@"Attempting to set compression level of an uninitialized file handle."]; + return; + } + + [[self exportFileHandle] setShouldWriteWithCompressionFormat:fileCompressionFormat]; +} + #pragma mark - #pragma mark Private API |