aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDump.m
Commit message (Collapse)AuthorAgeFilesLines
* Fix a number of memory leaks, and over-releases, as both a result of manual ↵rowanbeentje2010-02-101-2/+8
| | | | inspection of leaks and Clang static analysis.
* • some further work at the new field mapper sheetBibiko2010-02-051-4/+7
|
* - Rework SPSQLParser, extending DELIMITER support into all the original ↵rowanbeentje2010-02-051-43/+91
| | | | | | | | | | | functions (off by default). Remove the forked "...Sql..." functions, as they're now duplicates, and switch CustomQuery to using the original methods. - TableDump imports can now process DELIMITERs correctly as a result. - Alter the TableDump display of tables etc to use TablesList as the source of information, and used cached lists where appropriate for a small speedup. Also means we gain consistent sorting. - Display procedures and functions in the toggleable list when exporting as SQL - Tweak the procedure and function export to only export selected items, and also to respect the "export drop syntax" and "export create syntax" checkboxes - Fix a crash when removing items from the TablesList resulted in an errorneous selection by deselecting all rows before deleting (and preemptively applying the same fix to TableContent)
* • field mapping sheet is now document-modal instead of blocking SP entirelyBibiko2010-02-031-9/+24
| | | | | | | • if an error occurred while retrieving column or index data in Structure pane reset Structure pane to a stable status, display the error message, and reload Tables List table due to the fact the it's very likely that SP tries to retrieve data from a table which doesn't exist anymore • fixed spelling of "occurred" Note: NOT YET DONE: if in Structure view the actual underlying table was deleted or renamed by an other mysql event and the user tries to add/change a field do suppress this attempt safely
* - When exporting CSVs containing linebreaks, no longer escape those ↵rowanbeentje2010-01-221-7/+5
| | | | linebreaks if they are within a quoted cell, improving compatibility with other applications (notably Excel)
* Address Issue #546 (format string bugs):rowanbeentje2010-01-201-13/+14
| | | | | | - Fix incorrect uses of [NSString stringWithFormat:] with preconstructed strings and no arguments in SPUserManager - To fix display issues, replace NSBeginAlertSheet (which includes automatic sprintf expansion of the message) with a safely-escaped SPBeginAlertSheet in many files
* Issue 517: Export MySQL Dump does not include triggers or functionsbamse162010-01-141-58/+65
| | | | | | - added support for dump functions. If no errors are found, Issue 517 can be closed.
* Issue 517: Export MySQL Dump does not include triggers or functionsbamse162010-01-141-5/+71
| | | | | | - included export for proceduers. Need to add support for functions and test on different databases.
* • fix for i529: set the savePanel's delegate to self in order to handle ↵Bibiko2010-01-131-1/+3
| | | | changes of the accessory view (ie avoid disappearing of selected items)
* Issue 517: Export MySQL Dump does not include triggers or functions bamse162010-01-121-36/+46
| | | | | | | I've moved the export triggers part after the [streamResult release], so we can export triggers for empty tables too.
* Issue 517: Export MySQL Dump does not include triggers or functionsbamse162010-01-111-8/+43
| | | | | | | | | | | | | | First draft on export triggers. Known issues: - Now it exports only triggers for the table that have some content in it. If I move the write triggers part outside of the if (rowCount), the SHOW TRIGGERS query never finishes. - Sequel Pro complains when it tries to import the same file again. The error message is related to DELIMITER command. Still, the triggers seem to be present. This might be a different issue with Sequel Pro.
* - Upgrade Sequel Pro to be compiled as a 3-way PPC/i386/x86_64 binary for ↵rowanbeentje2010-01-091-64/+64
| | | | | | | release builds, including a large number of 64bit compatibility upgrades and tweaks - Upgrade RegexKitLite to 3.3
* - Ensure all results for server variable requests are returned as strings, ↵rowanbeentje2010-01-031-0/+2
| | | | | | | to avoid binary-mode result issues with certain versions of MySQL (including 4.1.14). This should address Issue #509. - TableDocument now requests the server version string from MCPConnection, aiding caching
* - Work through static analysis of the source, fixing a number of small ↵rowanbeentje2009-12-141-0/+1
| | | | memory leaks and fixing a couple of over-releases
* Replace the main toolbar's #define'd identifier constants with extern's. ↵stuconnolly2009-12-121-1/+1
| | | | This completes the conversion of all constants in SPConstants to extern's.
* - Improve import cancellation responsiveness, especially for lots of short ↵rowanbeentje2009-12-021-0/+2
| | | | | | | data rows or slow connections - Remove a debug NSLog on "Copy as SQL insert"
* - Correctly construct queries where the first column of CSV imports are set ↵rowanbeentje2009-12-021-1/+4
| | | | to "Do not import"
* Improve the export process:rowanbeentje2009-11-291-47/+113
| | | | | | | - Exports are now threaded, allowing use of other windows during the export, and can be cancelled (which deletes the partially written export file) including use of the new query cancellation support. - Correct the text of XML exports and improve progress feedback for XML exports. - Fix .dot export of tables including foreign keys to use the new foreign key formats.
* Updates to the 'use monospaced font' preference, making it a lot more ↵stuconnolly2009-11-141-31/+12
| | | | consistent across all table views. Also includes live updating when the preference is changed as well as its implementation in the query console, process list and variables table views.
* Move query mode constants to SPConstants.h.stuconnolly2009-11-131-13/+13
|
* - Rewrite field mapping table selection logic - simplified logic, no longer ↵rowanbeentje2009-11-111-44/+60
| | | | | | | | | | tied to table list selection. Much faster selection of table to import into if, eg, content view is selected. Fixes weird crashes. - No longer display views as import targets - When one import has been cancelled, still allow new imports - Improve error reporting - No longer re-sort table/view/etc names returned by TablesList as preferred order is being used for display and the default compare: reverts this
* During an import, before entering the loop to execute the current batch of ↵stuconnolly2009-11-111-0/+6
| | | | queries, check that the current connection is active and if not bail from the method.
* Fix syntax error in exported ER dot files. Issue #454avenjamin2009-11-101-1/+3
|
* • as default add the UTF-8 BOM (byte order marker) \xEFBBBF to a MySQL ↵Bibiko2009-10-291-1/+5
| | | | | | | | | dump file - this should simplify the loading of such a file in other text editors - to avoid the writing of that BOM one can add to Sequel Pro's preference plist the boolean key “NoBOMforSQLdumpFile” and set it to YES Note: If it turns out that this BOM causes problems one could add a checkbox for it to the NSSavePanel for instance later on.
* Replace the use of hard coded preference keys with constants to prevent ↵stuconnolly2009-10-171-15/+16
| | | | issues such as the one fixed in revision 1419. All future preference usage should be done so using these constants.
* - Fix a problem preventing the end of large CSV files from being importedrowanbeentje2009-10-151-1/+1
|
* • After importing CSV data execute [TableContent reloadTable:] on ↵Bibiko2009-10-081-2/+4
| | | | | | mainThread to avoid crashes if SP shows the data in the Content Browser in which the data will be imported. [It occurred sometimes that the current table should be updated but no data were available due to threading.]
* • outsourced ImportCSV accessory view to fix the disappearing of combobox ↵Bibiko2009-10-071-0/+22
| | | | | | values after re-invoking it - store the accessory settings in SP's preferences
* • fixed bug for CSV importBibiko2009-10-071-0/+8
| | | | - now the parser will be initialized by the import dialog's settings (was unintentionally deleted)
* Improve Growl interaction to reduce general Growl spammage and improve ↵rowanbeentje2009-10-031-0/+12
| | | | | | | | | | functionality: - Growls are now only shown by default if they are not fired from the frontmost window - Long-running tasks (>3 secs) will still Growl - Clicking on a Growl will now bring the associated window to the front This addresses the original concerns of Issue #98.
* - Add copy create syntax button to the create syntax sheet.stuconnolly2009-10-011-2/+2
| | | | | | - Fix the Growl notification prefs message as well as making the dialog a sheet. - Re-run genstrings to update localizable.strings and also remove use of multiple comments for a single string.
* Rewrite CSV import:rowanbeentje2009-09-281-571/+435
| | | | | | | | | | | | | - Replace the CSV parsing function (arrayForCSV:) with a new SPCSVParser class - Make speed improvements to SPCSVParser to achieve 1.9x faster parsing than the old arrayForCSV: function - Rewrite CSV imports to be performed as a streaming import, keeping memory usage much much lower - CSV field mapping preview is now shown very early on in the import process, as soon as the first hundred rwos are available for a preview - Progress bars are more consistent and accurate - CSV rows are grouped into batches of up to 50 (depending on line length) for import, falling back to one-query-per-row if errors occur. The current error reporting level is therefore maintained, but imports of non-erroring data are much much faster. - Improve processing speed slightly - Fix some odd edge cases in CSV parsing This addresses issue #389.
* • if the user chose to open a SQL file which is larger than 1MB SP asks ↵Bibiko2009-09-261-0/+5
| | | | for confirmation, furthermore if a connection is available the user can choose 'Import' instead of loading it into the Query Editor for cases that an user invoked 'Open…' accidentally instead of 'Import…'
* - Fix an SQL view export error - some MySQL server versions allow NOT NULL ↵rowanbeentje2009-09-141-1/+5
| | | | DEFAULT NULL, but don't allow definition of tables as that - fix the export of temporary placeholder tables for those views. Thanks to Andreas Falk for report and details.
* Significantly improve export:rowanbeentje2009-09-141-182/+314
| | | | | | | | - Rework CSV export to stream data, significantly reducing memory consumption and so increasing speed and stability when exporting large tables. By default safe/fast streaming is used, but a checkbox is available to select "low memory mode" full streaming, allowing export of any size table in theory. This addresses Issue #224. - Rework XML export to stream data in the same way, also significantly reducing memory usage and providing the option of using low memory mode. - Make SQL, CSV and XML export progress bars update more smoothly - When exporting the current browse view or custom query result, show an indeterminate progress bar when copying large resultsets to avoid the app appearing to hang
* • fixed bug for exporting tables as XML: now the very last row will be ↵Bibiko2009-09-111-1/+3
| | | | | | written to file [ this fixes issue 404 ] • FieldEditorSheet: if string cell content is "NULL" select the entire string for convenience
* - Re-enable the fine-grained query logging preferencesrowanbeentje2009-08-311-1/+22
| | | | | | | - Add defaults for fine-grained logging preferences - Add a method to TableDocument to allow setting the query mode, and use the query mode to control logging - Set import/export and custom query to set the appropriate query modes
* Refactor CSV/SQL import structure slightly, and rewrite SQL import:rowanbeentje2009-08-311-298/+413
| | | | | | | - SQL import now reads and processes files in full streaming mode, running queries as they are encountered - Memory usage during import is significantly reduced, and should stay within a few megabytes; the significant memory use remaining is for query logging - The progress bar more accurately represents progress and is shown at once (this addresses Issue #320)
* Update Localizable.strings by running genstrings and remove use of multiple ↵stuconnolly2009-08-281-3/+3
| | | | comments for a single string.
* - Change MCPStreamingResult to use a safer streaming mode by default - ↵rowanbeentje2009-08-201-1/+1
| | | | | | | download all results as fast as possible from the server, to avoid blocking, but do so in a background thread to allow results processing to start as soon as data is available. Many thanks to Hans-Jörg Bibiko for assistance with this. - Add an option to the SQL export dialog to allow selection of the full-streaming method, with a warning that it may block table UPDATES/INSERTS.
* Issue 351: Export CSV pipebamse162009-08-181-16/+8
| | | | | | I had to cheat and name the file %@.csv, so the suggested filetype is csv, but you can change it to something else.
* - Fix very end of exported SQL for tabel content with new export coderowanbeentje2009-08-171-1/+1
|
* - Fix field names in new import following classic last-minute change...rowanbeentje2009-08-171-1/+1
|
* Rework SQL export:rowanbeentje2009-08-171-12/+30
| | | | | | | - Added an MCPStreamingResult class to MCPKit, to allow streaming results from the server including fast array access of each row - Tweak SQL export to use the streaming result class and to keep memory usage lower End result is generally faster exports, more accurate progress bars, and much much lower (and consistent) memory usage.
* Rework data loading in TableContent:rowanbeentje2009-08-111-1/+1
| | | | | | | | | - Data loading now only occurs in one place in the code. This improves consistency and fixes a number of actions which used to trigger a full table reload followed instantly by a filter when the action was performed - If "Reload data after..." prefs are unticked, no longer load the data (ie the preference now works) - Make table count text more consistent and useful - Fix a number of small position-saving type problems with filters and limits active. This fixes Issue #200. - Clean up and standardise the code dealing with data storage - only one data storage array is now used.
* Source tidy up and missing SVN properties.stuconnolly2009-08-071-15/+16
|
* Fix sortorder of tables in export multiple tables as CSV/XML accesory viewbamse162009-08-051-3/+15
|
* Overhaul CSV import functionality:rowanbeentje2009-08-021-116/+244
| | | | | | | - When selecting CSVs SP will attempt to auto-detect the line endings to use - Throw an error if the CSV to be imported appears to have more than 512 columns, usually due to wrong line ending/quote/etc selection - Rewrite the CSV parser completely. New version correctly deals with CSV line terminators which are escaped or in enclosed content, correctly deals with quote strings which are the same as escape strings, and fixes a number of small edge cases. Performance on very long complex strings is slightly slower (~1.5 slower on long strings) but on large but simple tables is faster (~2.2x faster); memory usage is ~1.3x as high but all autoreleased. This addresses Issue #252.
* The size of the import array only needs to be counted once.stuconnolly2009-07-311-5/+6
|
* - Fix "endSheet:returnCode: requires a non-nil sheet" log lines during importsrowanbeentje2009-07-281-12/+6
| | | | | | - Enable threaded animation for import/export progress bars as it has minimal overhead and looks nicer - Fix exceptions caused by tablesList drawing during imports