aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDump.m
Commit message (Collapse)AuthorAgeFilesLines
* • CSV Import Field MapperBibiko2010-02-181-1/+1
| | | | - fixed bug, detect if csvimportarray contains global vars correctly
* • CSV Import Field MapperBibiko2010-02-181-1/+15
| | | | | - allow to define a list of global variables (incl. a true NULL value) - such a global variable will be inserted into the mapped table target field for all rows imported
* • TableDumpBibiko2010-02-171-25/+17
| | | | | | | | - introduced new method: - (void)showErrorSheetWithMessage:(NSString*)message to unify it and made all error sheets doc-modal (not app-modal) - Close button of the errorSheet now also listens at ESC
* • csv file import mapperBibiko2010-02-171-2/+12
| | | | | | - added button "Go Back" ⌥← to go back to the file chooser (mainly for correcting delimiter etc.) - improved selecting csv file columns for the case that column was set as 'Do not import'; now if set to 'Do not import' the value is hidden, click the user on it the popup menu appears and the operator is set to 'Do import' automatically • TableDump now remembers the last chosen csv file name
* • field mapper controllerBibiko2010-02-161-5/+6
| | | | | | | | | | - fixed precocious releasing of mapper settings - fixed boolean binding for displaying "1 of first 100 records" - added further gui elements (not yet activated) - sheet dimensions are now auto-saved - bound keystroke ⇢ and ⇠ to row stepper - renamed some stuff - added clarification notes
* • re-factored and outsourced the entire CSV import field mapper sheetBibiko2010-02-161-179/+41
| | | | | | | | | | | | | | | | | | - changed the way to choose whether a source field should be imported or not by introducing a new table column 'operators' - clicking at the 'operator's header toggles all operators to 'Import' or 'Do not import' - added tooltips for each table cell; if file's first line are the headers show them in the tooltips as well - added checkbox "First line contains fields names" since it'll be clear in this pane whether a file has a header line or not (will be sync with prefs) - added the possibility to choose the import method: INSERT INTO or REPLACE INTO • deleted all old field mapper stuff from TableDump and DBView.xib Notes: - tests are needed to be sure that this change does not cause mismatches while importing - symbols for Do (not) import are tendative - maybe use images - a further import method UPDATE plus an operator '=' will be added soon - chance to add a new global source variable will come soon - displaying of source field types will come soon - semi-automatically matching of source field names and header names will come soon - the GUI needs some improvements afterwards
* 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.