aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPSQLExporter.m
Commit message (Collapse)AuthorAgeFilesLines
* Fix export of BIT fields in SQL (#2262)Max2015-10-041-3/+2
|
* 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
* Improve handling of BIT fields, including:stuconnolly2010-07-151-3/+8
| | | | | | | | | - Exporting BIT fields properly in SQL dumps using b'x' notation. - Properly handling editing of BIT fields in both the content and custom query results views. - Correctly display BIT fields in the content view, where binary values are zero-padded to the specified length of the field. (Note, that the new BIT handling logic has only been added to MCPKit's MCPStreamingResult and MCPResult as the latter does not keep a record of the field's length which the new functionality depends on. Needs to be discussed).
* Given that the user can now decide how often a new INSERT statement is ↵stuconnolly2010-07-081-2/+6
| | | | created when performing an SQL dump, replace the use of stringWithFormat: with appendString: for a potential speed improvement.
* Fix various memory leaks as a result of static analysis.stuconnolly2010-07-061-3/+3
|
* - Fix SQLexporter known issue from r2311, and fix compilation against the ↵rowanbeentje2010-06-131-2/+2
| | | | 10.5 SDK
* Exporter ehancements:stuconnolly2010-06-131-12/+21
| | | | | | | - Make sure the export button is disabled when the global structure, content and drop options are enabled, but the desellect all button is checked. - Replace the export dialog toolbar with a tabview, reducing the dialogs overall size. - Add the option to SQL dumps to specify when a new INSERT statement should be created, either after a certain amount of data or after a specific number of rows (defaults to every 250KiB). Known issue: incorrect VALUES clause generation of last row when creating a new INSERT after a specific number of rows.
* A number of exporter improvements:rowanbeentje2010-06-071-69/+97
| | | | | | | | | | | | - Improve interface validation on the SQL view, including fixing no-content toggling - Fix the export of views to correctly construct placeholder tables and fix view syntax export (this addresses Issue #707) - Fix logic controlling Stored Procedure and Function export - fix hangs and allow correct export - Handle permission errors when retrieving Stored Pro/Function syntax - Improve export of linebreaks in CSV quoted cells for improved Excel compatibility - SQL export now retrieves table syntax as it progresses through the tables - more accurate progress bar and removes initial pause when exporting lots of tables - Alter filename construction to use centralised filename string: fixes end export Growl notification - Improve dump comments
* Remove multiple occurrences of accessing the same array element, improving ↵stuconnolly2010-05-271-6/+8
| | | | the overall performance of SQL dumps.
* Rename TablesList to SPTablesList.stuconnolly2010-05-271-1/+1
|
* - Fix SQL export progress displayrowanbeentje2010-05-271-507/+503
| | | | | - When compression is enabled, use .sql.gz as file extension instead of .gz
* Merge export redesign branch back into trunk.stuconnolly2010-05-241-2/+770
| | | | | | | | | | | | | | | | | | | | | 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.
* More export redesign work. CSV data generation is currently working using ↵stuconnolly2009-10-061-0/+18
| | | | the old non-streaming code, but does not yet write to any files. Please note that this is still very much a work in progress.