aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableSource.m
Commit message (Collapse)AuthorAgeFilesLines
* Merge in a range of bugfixes from trunk:rowanbeentje2010-08-011-120/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r2201, r2470 (Table trigger improvements, and fixes for MySQL <3.23.5x) r2211, r2214, r2232, r2245, r2247, r2265, r2266, r2267, r2280 (User manager fixes) r2213 (Incorrect count display) r2215, r2270, r2283, r2285, r2471 (Thread-safety fixes) r2216 (Task progress indicator fixes) r2217 (CSV import field mapping fix) r2218, r2219 (Custom queries fixes) r2222 (Fix issues when opening files) r2223 (Fixes problems copying binary data as tab-delimited strings) r2224 (Fixes 10.5 not appending correct extension on export) r2225, r2324 (Fixes to background database structure querying, extend structure querying to MySQL 3 & 4) r2227 (Fixes to table saving on right-clicking) r2228 (Memory use fixes) r2272, r2279, r2286, r2398, r2399, r2420 (Favourites sorting) r2275 (Improved handling of corrupt tables, disabled storage engines etc) r2278 (Custom query autocomplete tab snippets not working under 10.5) r2297 (Fix structure editing errors) r2307 (Make return key behaviour in structure view consistent with content view) r2335 (Fix crashes when cancelling/stopping queries on MySQL 3 & 4) r2345 (Import from clipboard improvements) r2362 (Improve robustness when closing windows quickly) r2384 (Respect "Reload after editing" preference when editing custom query results) r2385 (Prevent custom query uppercasing of reserved keywords which are quoted) r2396 (Improve reordering of TIMESTAMP fields) r2411, r2444, r2446 (Improve Xcode 3.2.3 project compatibility) r2438 (Fix exceptions printing extended table info) r2441 (Fix resizing table information after initial collapsed state) r2445 (Improve default socket search paths) r2463 (Fix custom query capturing up/down arrow when autocomplete finds no matches) r2479, r2482 (Replace Core Animation with custom code to fix hangs) r2486 (Improve data storage exceptions)
* - Merge in r2209release-0.9.8rowanbeentje2010-05-041-10/+23
|
* - Merge in fixes from trunk for final release - incoporates r2175, r2177, ↵rowanbeentje2010-05-031-3/+11
| | | | r2184, r2198, r2200, r2203, r2205 and r2206.
* Merge in a number of fixes from trunk (r2065, r2066, r2067, r2068, r2069, ↵rowanbeentje2010-04-241-29/+36
| | | | r2074, r2075, r2076, r2078, r2079, r2081, r2083, r2084, r2085, r2089, r2090, r2100, r2110, r2117, r2118, r2119, r2120, r2128, r2132, r2133, r2134, r2137, r2138, r2139, r2140, r2142, r2150, r2152, r2153, r2154, r2155, r2158, and r2160)
* • some speed improvements and code simplifications for navigatorBibiko2010-03-301-2/+2
| | | | | | • avoid making the completion key list unique since it's possible to insert unique items only • added trigger to query db structure after SQL import • some work to avoid http://log.sequelpro.com/view/90 (not yet ideally - WIP)
* - 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
|