aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPSQLExporter.m
Commit message (Collapse)AuthorAgeFilesLines
* Formatting changes and a note on #2955Max2018-04-271-38/+66
|
* SQL export used the wrong syntax for view placeholders when the columns ↵Max2017-11-171-1/+6
| | | | contained a type with decimals (#2927)
* Restrict some variables to their actual usage scopeMax2017-01-271-12/+11
|
* Fix an issue with SQL exports when configured to create an new INSERT ↵Max2017-01-271-9/+10
| | | | statement for every single row (#2671)
* Move some shared code to the parent classMax2015-11-211-13/+0
|
* Export SQL in utf8mb4 if available (part of #2321)Max2015-11-201-0/+12
|
* Reorder some code to remove duplicate code and make leaking a ↵Max2015-11-201-17/+1
| | | | NSAutoreleasePool more difficult
* * move some duplicate code into it's own methodMax2015-11-201-0/+3
| | | | | * remove some duplicate onMainThread calls * if an exporter needs a certain charset it'll have to set that itself now
* Restructure some code for shorter linesMax2015-11-201-34/+43
|
* Add support for CURRENT_TIMESTAMP(n) in default/on update column of ↵Max2015-11-041-2/+2
| | | | DATETIME/TIMESTAMP fields (part of #2315)
* Fix export of BIT fields in SQL (#2262)Max2015-10-041-3/+2
|
* Replace some malloc(a*b) with the safer calloc(a,b) variantMax2015-06-301-2/+3
|
* Fixed a typoGeorge Gardiner2015-04-131-1/+1
|
* Formalize [x release], x = nil; conventionMax2015-01-041-6/+6
| | | | | Take this commit as a proposal to formalize our existing "[x release], x = nil;" convention by introducing a macro for it. Feel free to revert this commit if you see issues with the approch or implementation.
* Replace some NSDictionaries with literalsMax2014-12-131-1/+1
| | | | | | * [NSDictionary dictionary] → @{} * [NSDictionary dictionaryWithObject:forKey:] can safely be replaced. object==nil would have already thrown a NPE in the past. * Also replaced some (hopefully safe) NSArray initializers (ie. their objects should always exist).
* Add basic support for CURRENT_TIMESTAMP in DATETIME columns (MySQL 5.6.5)Max2014-03-191-1/+1
| | | | See #1867
* Update URL in source file header to point to GitHub.Stuart Connolly2014-01-261-1/+1
|
* Remove SVN property placeholder.Stuart Connolly2014-01-261-2/+0
|
* Tidy up.Stuart Connolly2014-01-141-4/+2
|
* - Fix an issue that could cause invalid SQL exports if table contents ↵rowanbeentje2013-09-051-47/+35
| | | | | | | changed between two queries, addressing Issue #1726 - Remove a check against export cancellation when exporting every cell of a table, leaving the check on every row
* - Fix all the Xcode 4.6.2 build warnings, and tweak warning settings to ↵rowanbeentje2013-05-211-1/+1
| | | | enable some more
* - Specify the NULL status of fields when creating view placeholders on ↵rowanbeentje2013-04-141-1/+5
| | | | export, fixing problems with invalid timestamp NULL defaults, addressing Issue #1686
* Fix some 10.8 warnings.stuconnolly2013-02-171-4/+6
|
* Remove useless init and dealloc method comments and perform general tidy up.stuconnolly2013-01-221-3/+2
|
* Change Sequel Pro's license from GPL (version 2) to MIT.stuconnolly2012-07-251-12/+20
|
* - Change handling of binary string field types during exports: ask MySQL to ↵rowanbeentje2012-06-041-46/+83
| | | | | | | | return their data as pre-prepared HEX values to avoid character encoding/binary data issues, addressing Issue #1330. - Fix outputting headers for tables not being exported, addressing Issue #1365 - Speed up export of numeric values slightly
* Improve formatting of SQL keywords in view syntax prettifier and add an ↵stuconnolly2012-05-081-4/+4
| | | | associated test.
* - Manually handle some SPFileHandle memory management to significantly ↵rowanbeentje2012-04-121-19/+27
| | | | | | | improve memory usage during large exports, particularly improving memory which appeared to never be reclaimed - Fix some minor memory leaks throughout the application
* - Alter table trigger export to only occur if the table structure export is ↵rowanbeentje2012-04-111-43/+46
| | | | enabled for a table, instead of for all tables
* - Clean up SPMySQL and QueryKit inclusion and search methods, which should ↵rowanbeentje2012-03-271-1/+1
| | | | | | | fix nightly builds - Fix warnings
* - Fix incorrect queries when building up an export by removing the ↵rowanbeentje2012-03-271-5/+7
| | | | additional semicolons. This addresses Issue #1311.
* Warning: this branch commit is largely untested, and known to throw ↵rowanbeentje2012-02-231-38/+38
| | | | | | | | | | | | exceptions as database structure retrieval is currently missing! Further work on SPMySQLFramework integration: - Improve SPMySQL framework build settings including correct ppc builds and a Distribution configuration for the build distributions to match - Add new convenience querying and result methods to the framework - Amend Sequel Pro source to use the new SPMySQL.framework methods everywhere, replacing MCPKit methods where they differ and improving some functions - Remove MCPKit from the source - Fix a number of warnings on Release-style builds
* Add the option to the SQL export view as to whether or not the ↵stuconnolly2011-07-101-1/+8
| | | | AUTO_INCREMENT value on a table's structure is included. Defaults to not included. Implements issue #1064.
* Implement a large number of minor fixes and improvements to export ↵rowanbeentje2011-05-071-11/+12
| | | | | | | | | | | | | | | | | | | | | | functionality, including an overhaul of filename NSTokenField functionality: - Improve the NSTokenField used for export filenames: only tokenise reserved tokens, don't tokenise reserved words which are parts of other words, allow the comma to be used, update tokenisation during typing, and prevent whitespace triming. - Save the last selected export path, and make the path selection button open a dialog to the selected directory - Save the export filename and restore on future uses of the export dialog (only if the name contains placeholder tokens, so one-off export names aren't saved) - If the advanced options are collapsed, display a summary of the selected options next to the disclosure triangle - Display a small warning in the corner of the window if the export file cannot be imported into Sequel Pro, to warn those people attempting to back up their databases in XML - Clarify and improve the export warning dialog if files already exist or could not be created; make the simpler file-exists cases reflect OS-style dialogs, alter wording based on the number of files that failed and how they failed, and only show the "replace" or "skip" type buttons if it makes sense to do so. - Fix a mutation-during-enumeration error when skipping files - If "Cancel" is chosen in the export file creation replace/error dialog, redisplay the export sheet with the previous selection still active - Add support for year, month and day tokens in the filename token list - Don't allow blank custom filenames, before or after tokenisation, as this can cause problems - instead fall back to default filenames in those cases - Only append the extension if one hasn't been set - on all export formats, extending r3284 - If exporting to multiple files option is enabled but only one table is selected, supply that table name for filename table tokens - Update the progress bar to reflect update progress when exporting CSV data - Fix a bug causing exports to hang if the low-memory advanced option was set and content was selected to export and any empty tables were encountered - Save memory use and compression advanced export settings across sessions - Update localisable strings
* Fix more compiler warnings, including a few bugsrowanbeentje2011-03-081-4/+5
|
* fixed compiler warningssqlprodev2011-03-011-1/+1
|
* - Fix incorrect quoting of BLOB fields on SQL exportsrowanbeentje2010-10-251-2/+3
| | | | | | - Use indeterminate progress bars when importing BZIPped SQL files - Support .tsv as a CSV extension, and automatically choose the field delineator based on .csv/.tsv extension
* - Split out all of SPExportController's delegate methods to their own category.stuconnolly2010-10-241-2/+0
| | | | | | | | - Prepare for the implementation of PDF and HTML export by hiding the export options box for export types that don't need it. - Fix some spacing issues on the export dialog. - Create a new SPCategoryAdditions header that is included in the apps precompiled header, making all additions available to all classes. - Update strings files.
* Considering nearly every class uses constants, import it via the prefix header.stuconnolly2010-10-191-1/+0
|
* Localize the header included in SQL and XML exports.stuconnolly2010-10-191-5/+5
|
* • for each export/copy/drag method other than SQL pass any spatial fields ↵Bibiko2010-10-091-1/+5
| | | | as WKT string; for SQL pass them as X'…' binary data
* Various improvements to server capability/version checking, including:stuconnolly2010-10-071-0/+8
| | | | | | | | | | | | | - Add a new ServerSupport class, for which an instance is created upon each new connection and is then subsequently accessible via SPDatabaseDocument. - Replace the majority of manual version checking with calls to properties in the above new class. - Improve the user manager's compatibility with MySQL 3 and 4 servers. Fixes issue #811 Other changes include: - Disable the encoding popup button when adding a new table or database to servers running pre MySQL 4.1 as it only contains one option, 'Default'. - Fix various potential memory leaks discovered during static analysis. - General tidy up and comments.
* New add index sheet, which includes:stuconnolly2010-09-171-0/+2
| | | | | | | | | - The ability to easily index multiple columns - The ability to specify the storage type (HASH or BTREE) that should be used when available and permitted - The ability to specify a length prefix when indexing a specific column (required on TEXT columns) Requires lots of testing.
* Exporter:rowanbeentje2010-08-261-1/+1
| | | | | | - 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)
* • overall replacement of:Bibiko2010-08-201-42/+27
| | | | | | | | | [aString appendString:[NSString stringWithFormat:]] by [aString appendFormat:] since it's much more faster • first look at loop where several [aStr appendString:] occur to try to combine them into one appendString or appendFormat since the allocation of memory takes really time Note: I tested all my changes but we should test it further to be sure that I didn't a mistake!
* Fix various potential memory leaks and general warnings as a result of ↵stuconnolly2010-08-191-0/+3
| | | | static analysis.
* Various export enhancements and fixes, including:stuconnolly2010-08-121-213/+228
| | | | | | | | | | | | - A new SPExportFile class, providing an abstract interface to the handling and creation of export files. - Enables the centralisation of all file/file handle creation logic as well as better support for handling situations where files fail to be created, including files that already exist at the export location. - New SPExportFileHandleStatus constants to support the reporting of file handle creation. - Update SPExporter to use the new file class instead of directly using an instance of SPFileHandle. - Add the necessary logic to deal with files that already exist on disk, by providing the user with 3 options: cancel the export, ignore the files in question or overwrite them. We might want to enhance this to make new files sequential in name to prevent overwriting. Fixes issue #742. - New SPExportFileUtilities category, which centralises all the logic relating to writing export type headers as well as dealing with problems occurred during file/file handle creation. - Improve feedback given on the export progress sheet during export initialisation. - Tidy up and improve comments.
* • while exporting SQL skip safely non-existing tables (due to encoding ↵Bibiko2010-08-101-195/+199
| | | | problems or others) and write an error message to the file regardless the "Add Error" setting
* In addition to Gzip compression support when exporting SQL dumps add the ↵stuconnolly2010-07-241-15/+3
| | | | | | | | | | | | | | | | | | ability to use Bzip2 compression. Other changes include: + Enable the use of export compression (Gzip and Bzip2) for all export formats. + Move the compression options in the export dialog to the 'Advanced' export settings view. + Simplify the setting of common exporter properties (e.g. the connection, use of compression). + Fix a potential memory leak in the dot exporter. + Update the data importer to recognise Bzip2 compressed files. + Fix several display issues on export dialog. + Restore the default .csv file extension of CSV exports. + Correctly update the default export filename when selecting a output compression type. The addition of Bzip2 compression support implements issue #688.
* - Expose a number of help menu items and help buttons to use localisable ↵rowanbeentje2010-07-181-1/+1
| | | | | | | | strings - Tweak MySQL help search to include a localisable language code for results in requested languages This addresses Issue #743