aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableSource.m
Commit message (Collapse)AuthorAgeFilesLines
* - When switching tables, correctly catch disconnections and suppress error ↵rowanbeentje2010-03-271-12/+12
| | | | | | | | | dialogs and related crashes - Move connection error sheet close method to the connection delegate - Tweak the information_schema db schema building query to be much faster on busy servers by amending the VIEW part - Set the connection lock to nil after releasing, coping with connection unlocks deferred on the main thread until after dealloc
* • navigatorBibiko2010-03-261-2/+2
| | | | | - fixed issue if different connection windows are connected to the same connection - prepared structure querying method to be able to add user info containing which table/db was changed if we know it to reduce the future parsing cost
* • first steps to ease the structure querying for auto-completion and navigatorBibiko2010-03-261-2/+7
| | | | | | | - now it accumulates the data and caches them db by db, ie one has to select a db before using its structure for completion and navigator - next step is to avoid querying info_schema as much as possible - it will only query the structure if something was changed - next steps follows as soon as possible
* - Make [MCPConnection getLastErrorMessage] more consistent by always ↵rowanbeentje2010-03-251-10/+10
| | | | | | | returning nil if no error occurred (previously a blank string was returned most of the time) - Add a new (BOOL)[MCPConnection queryErrored] method, changing all error message checks to use it for clarity
* General tidy up, with a focus on consolidating more constants in ↵stuconnolly2010-03-241-9/+9
| | | | SPConstants.h/m.
* - Simplify table source table setup and make thread safe. This should ↵rowanbeentje2010-03-221-159/+140
| | | | | | | | address http://log.sequelpro.com/view/43 , http://log.sequelpro.com/view/46 - Improve keepalive timer interaction - this should address http://log.sequelpro.com/view/74 and http://log.sequelpro.com/view/71 - Further thread safety improvements to Custom Query, Table Document, and the history controller
* When adding an index, after splitting the list of supplied columns strip ↵stuconnolly2010-03-221-16/+10
| | | | leading and trailing whitespace rather than checking whether the first character is empty. This accommodates lists of fields which have more than one leading and trailing empty characters and fixes the following exception: http://log.sequelpro.com/view/70.
* - Make a number of changes to attempt to improve disconnection/quit ↵rowanbeentje2010-03-161-2/+2
| | | | | | | | | crashes: prevent multiple disconnects, add more checks, cancel current queries, and add a tiny delay to allow mysql cleanup. - Alter MCPStreamingResult to no longer return a retained instance, setting up correct result disposal on autorelease but changing callers to retain as soon as they receive. - Review and change a number of local variables shadowing/shielding other local or global variables.
* Following a manual code review, fix some local variables overriding global ↵rowanbeentje2010-03-151-1/+2
| | | | variables, a few leaks, and additional nil setting/checking to prevent overreleases or releases of random areas of memory.
* Peform the removal of table fields on a background thread with the option to ↵stuconnolly2010-03-141-17/+43
| | | | cancel the operation to prevent locking up the main thread.
* Peform the addition and removal of table indexes on a background thread with ↵stuconnolly2010-03-141-21/+54
| | | | the option to cancel the operation to prevent locking up the main thread. Fixes issue #591.
* - Fix some leaks and autoreleases after checking static analysisrowanbeentje2010-03-131-8/+6
|
* Lots more printing support enhancements, including:stuconnolly2010-03-131-9/+37
| | | | | | | | | - The ability to print the extended table information view using a new template. - The inclusion of NULL values diaplyed as the user's NULL value placeholder when printing a table's sturcture and indexes. - If enabled in the user's preferences, the inclusion of vertical gridlines in the table views. - Dynamic calculation of page margins based on the paper size of the selected printer as opposed to using hard coded values. - Lots of other little style enhancements.
* Various printing support enhancements, including:stuconnolly2010-03-121-15/+41
| | | | | | | | | - Splitting out all printing methods to SPPrintController which is category of TableDocument. - The ability to print table relations. - If present the inclusion of table indexes when printing a table's source. - If the user has use monospaced fonts enables, then the print out's tabular data will be in a monospaced font. - Lots of other style enhancements, including page headings and sections headings.
* - Fix an exception when table source edit errors occur and the user ↵rowanbeentje2010-03-071-1/+1
| | | | requests changes be discarded; this addresses http://log.sequelpro.com/view/16
* - Fix exception on duplication of table source rows that haven't been saved ↵rowanbeentje2010-03-071-3/+7
| | | | | | | yet; this addresses http://log.sequelpro.com/view/23 - Clean up fix in r1859
* • Reset AUTO_INCREMENT in Table Info Pane uses inline entering of the new ↵Bibiko2010-02-231-4/+5
| | | | | | | | | | value (no sheet) • "Delete all records" confirmation sheet shows a checkbox "Reset AUTO_INCREMENT after deletion" if PRI key is given for that table • minimized table data querying for auto_inc • optimized auto_inc change notification • if user changes tabVIew to Table Info Pane update data in beforehand • TRUNCATE query updates auto_inc value as well in TABLE INFORMATION
* • implemented chance to reset AUTO_INCREMENT of the PRIMARY KEY field in ↵Bibiko2010-02-221-21/+51
| | | | | | | | Table Info Pane via Advanced popup button and sheet (not yet optimal GUI solution) • SPAlertSheets - ensure that this sheet becomes the keyWindow
* • implemented chance to reset AUTO_INCREMENT of the PRIMARY KEY field in ↵Bibiko2010-02-221-3/+18
| | | | | | Structure Pane via right-click at the index tableView - implementation in the Table Info follows soon
* • initial work to give the chance to reset the table's AUTO_INCREMENT valueBibiko2010-02-221-0/+25
| | | | - not yet active
* • improved error handling in Structure View for adding/renaming/removing a ↵Bibiko2010-02-031-2/+26
| | | | | | | field if the actual underlying table doesn't exit anymore; now it informs the user, clean the view, and reloads the Table List • improved error handling in Content View for refreshing data for the current table if the table doesn't exist anymore - this fix and the fix in [TableContent setCompareTypes:] to check for valid table data removes some NSPlaceholderString and NSScanner warnings
* • field mapping sheet is now document-modal instead of blocking SP entirelyBibiko2010-02-031-0/+42
| | | | | | | • 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
* • added call to update the completion list to neuralgic placesBibiko2010-01-211-0/+3
| | | | - next steps to minimize the traffic - ie manipulating the dict directly without querying - follows
* Address Issue #546 (format string bugs):rowanbeentje2010-01-201-7/+8
| | | | | | - 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
* • fixed several sheetDidEnd selectors to close a NSAlert or NSWindow ↵Bibiko2010-01-131-3/+6
| | | | | | | properly to avoid overlapping sheets • F5 completion - if a table is selected and no further parsing info is given show that table and its fields at the top of the suggestions
* Improve row deselection and error handling in Table Source and Content views:rowanbeentje2010-01-091-12/+22
| | | | | | | | - Change the error dialog buttons to "Edit row" and "Discard changes" instead of "OK" and "Cancel" - Correctly refocus the deselected row - Edit the first cell in the row after errors. - Fix row deselection and error handling on the Table Source view
* - Upgrade Sequel Pro to be compiled as a 3-way PPC/i386/x86_64 binary for ↵rowanbeentje2010-01-091-33/+33
| | | | | | | release builds, including a large number of 64bit compatibility upgrades and tweaks - Upgrade RegexKitLite to 3.3
* • replaced the (10.4) deprecated [NSTableView ↵Bibiko2010-01-041-14/+8
| | | | | | tableView:writeRows:toPasteboard:] method by [NSTableView tableView:writeRowsWithIndexes:toPasteboard:] • some code cosmetics
* - Ensure all results for server variable requests are returned as strings, ↵rowanbeentje2010-01-031-0/+3
| | | | | | | 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
* Remove unused variable.stuconnolly2009-12-151-2/+0
|
* Replace the main toolbar's #define'd identifier constants with extern's. ↵stuconnolly2009-12-121-3/+3
| | | | This completes the conversion of all constants in SPConstants to extern's.
* Implement the same logic as implemented in r1548 except for the removal of ↵stuconnolly2009-11-241-62/+119
| | | | indexes. As foreign keys have a dependency on the presence of indexes to prevent table scans, offer the user the ability to drop the relationship before the index, which would otherwise result in an error if not dropped first.
* When attempting to delete a field that is part of a foreign key ↵stuconnolly2009-11-181-5/+51
| | | | | | | | | relationship, remove the key before the field to prevent an error. Obviously warn the user that the key is being dropped as well. Fixes issue #462. This check also needs to be implemented when removing indexes as foreign keys depend on the presence of indexes to prevent table scans. Something to be discussed, the display of foreign keys that are made up of multiple fields in the relations table and link arrows in the content table.
* Implement query cancellation support within MCPKit, and add it to the task ↵rowanbeentje2009-11-151-2/+14
| | | | | | | | | | functionality: - MCPKit now supports cancelling the active query; for MySQL servers >= 5.0.0 a query kill is attempted from a new connection, and if that fails or for MySQL < 5 a reconnect is triggered. - TableDocument now supports enabling a cancel task button on the task interface, including an optional callback - Implement query cancellation for custom queries. This addresses Issue #86. - Implement query cancellation for table content loads, filters, and sorts.
* Updates to the 'use monospaced font' preference, making it a lot more ↵stuconnolly2009-11-141-76/+50
| | | | 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.
* Set keyboard shortcut for Delete button in alert dialogs to command D.avenjamin2009-11-091-2/+4
| | | | Set keyboard shortcut for Truncate button in alert dialog to command T
* Switch buttons on delete index dialog.stuconnolly2009-11-091-3/+3
|
* When removing a field or index, use its name in the dialog message.stuconnolly2009-11-091-10/+11
|
* Don't run the add new index sheet modally, thus blocking the main thread. ↵stuconnolly2009-11-091-168/+194
| | | | Part of issue #357. Also some refactoring.
* When creating a new field of type BIT, allowing default values in BIT ↵stuconnolly2009-11-071-12/+14
| | | | notation. For example b'1'. Fixes #340.
* - Alter query start/stop notifications to apply to only the originating ↵rowanbeentje2009-11-051-4/+4
| | | | window, regardless of key state, by passing in and looking for the table document instance
* - Add task support to all the main interface viewsrowanbeentje2009-11-041-9/+6
| | | | | | | | - Improve task support on previously supported views - Use a threaded task load for all initial table loads - Support threaded task loads for table content loads, reloads, sorts, and filters - Improve upon previous threaded task loads by minimising view updates and supporting updates of the existing data arrays where valid
* Replace the multiple occurrences of hard coded toolbar identifiers for the ↵stuconnolly2009-10-281-2/+2
| | | | main toolbar with constants.
* Missing space when appending extra field info when creating a new field. ↵stuconnolly2009-10-271-0/+1
| | | | Fixes original problem reported in issue #445.
* Change the order of the cancel/remove buttons on the remove field dialog.stuconnolly2009-10-271-3/+3
|
* - Set up TableSource to respond to task notifications to prepare for ↵rowanbeentje2009-10-271-3/+75
| | | | | | | threaded queries - Alter task notifications to pass the TableDocument as the notification object so that only the current window responds to the notification, allowing other windows to be fully used while a window is performing a task
* Replace the use of hard coded preference keys with constants to prevent ↵stuconnolly2009-10-171-12/+13
| | | | issues such as the one fixed in revision 1419. All future preference usage should be done so using these constants.
* - When moving or editing table columns, preserve comments and any column ↵rowanbeentje2009-10-031-0/+29
| | | | | | | details which are currently unhandled (column formats, storage, references). This addresses the data loss part of Issue #180. - Parse out column comments in SPTableData to allow displaying or editing comments in future
* - Replaces uses of the deprecated selectRow:byExtendingSelection: with ↵rowanbeentje2009-09-021-7/+7
| | | | selectRowIndexes:byExtendingSelection:
* - The add, rename and copy table sheets should not block the main thread ↵stuconnolly2009-08-181-24/+44
| | | | | | | | (part of issue #357). - Improve the consistency of destructive confirmation dialogs by making the remove field and index dialogs default button 'Cancel' with a key equivalent of return. - Disable the remove field button when the currently selected table only has one field, removing the need for the extra check (and subsequent dialog) when the user attempts to remove a field.