aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableContent.m
Commit message (Collapse)AuthorAgeFilesLines
* • replaced the (10.4) deprecated [NSTableView ↵Bibiko2010-01-041-5/+5
| | | | | | tableView:writeRows:toPasteboard:] method by [NSTableView tableView:writeRowsWithIndexes:toPasteboard:] • some code cosmetics
* • ContentFilterManagerBibiko2010-01-041-2/+5
| | | | | - reimplemented the display of the conjunction label for two arguments - fixed bug while parsing and storing the number of arguments of each filter definition
* - 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
* - With the improved row count support and behaviour, replace the old "Fetch ↵rowanbeentje2010-01-021-1/+5
| | | | correct row count" preference with a new Table row counts query level (never, only for small tables, always), defaulting to only for small tables - boundary currently set to 5MB. This addresses Issue #500
* - Tweak the pagination interface - remove the text and replace with an ↵rowanbeentje2009-12-151-13/+2
| | | | icon, to reduce the overall space taken up in the bottom bar and to make it clearer a jump-to/options button is available
* 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.
* - Tweak positioning of old "working" spinner to center and align itrowanbeentje2009-12-081-65/+103
| | | | | | - Fix pagination to not enable the "next page" arrow when looking at a small, complete, filtered result - Move content table setup and drawing to a new method called on the main thread. Should improve thread safety, and fixes flickering updates. Tweak a few bits of drawing code to take advantage of main thread status to further reduce flicker and jumping
* - Fix saving of files or images added to the SPFieldEditorrowanbeentje2009-12-041-4/+3
| | | | | | - Fix a couple of memory leaks in the SPFieldEditor - Fix a crash caused by attempted reselection of databases after disconnection if no database was selected
* - Ensure the table length is updated before the end of the load to fix ↵rowanbeentje2009-12-011-0/+2
| | | | crashes in the old non-threaded code when the row count is reduced (performSelectorOnMainThread:waitUntilDone:NO was deferring updates until past table reload). This addresses Issue #487.
* - When working with the storage arrays for CustomQuery and TableContent, ↵rowanbeentje2009-11-281-32/+73
| | | | use thread locking to ensure data safety while the table is loading. This should fix intermittent loading and reload issues, including part of #463 and should address Issue #482
* - Fix a couple of thread safety issues in TableContent, and attempt to fix ↵rowanbeentje2009-11-241-6/+12
| | | | | | | an occasional crasher when getting table cells by adding a retain - Alter MCPStreamingResult to use pthread mutexes in a further attempt to address Issue #463
* - Tweak pagination to fix click-through of pagination popup, fix next page ↵rowanbeentje2009-11-231-1/+3
| | | | | | | button mouseover text, display no text when 0 or 1 pages of results for clarity - No longer include the old app icon in the built product (but leave it in the project)
* - Replace the LIMIT interface on the content view with a pagination control ↵rowanbeentje2009-11-231-95/+197
| | | | | | | | at the bottom. This addresses the last of Issue #49 and implements Issue #133; jump-to and two prefs affecting loading are available in a popup when clicking the pagination interface. - Format row counts at the bottom of the content pane - Increase the MCPStreamingResult buffer for a stronger workaround for #463
* - Improve upon r1560 by removing a couple of race conditions triggered on ↵rowanbeentje2009-11-221-1/+1
| | | | | | | encoding changes, status requests, or blob/text lookups on slower connections - Restore first responder in TableContent loads on the main thread to fix a potential crasher
* - Relocate the table changed notification, allowing table info pane to ↵rowanbeentje2009-11-211-1/+2
| | | | | | | update early in the change process, but ensure the change notification occurs on the main thread for stability. Added NSNotificationAdditions from the Colloquy project for this. - Change the design of the progress indicator layer, and tweak task progress for improved feedback and less flickering by correctly updating interface as appropriate, and delaying status changes for a short time. This partially addresses Issue #455.
* Delay the releasing of the createTableSyntax variable in SPTableData until ↵stuconnolly2009-11-201-6/+13
| | | | we are about the replace it to prevent threading issues. Also, in fieldListForQuery check that dataColumns array is not empty before constructing the field list as well as only obtaining the table's columns if the field list is going to be built in the first place.
* Update Localizable.strings and remove multiple keys for a single item.stuconnolly2009-11-181-1/+1
|
* When attempting to delete a field that is part of a foreign key ↵stuconnolly2009-11-181-4/+7
| | | | | | | | | 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.
* - Make some thread safety improvements to improve on Issue #460rowanbeentje2009-11-181-2/+2
| | | | | - Add some NSTextView editing notifications to maintain state correctly in an attempt to fix issue in crash log on comment 9 on #460
* - Correctly report errors triggered *during* result download for streaming ↵rowanbeentje2009-11-161-1/+1
| | | | results. This improves partial content displays (using the new code as of r1530) and also improves custom query error reporting.
* Implement query cancellation support within MCPKit, and add it to the task ↵rowanbeentje2009-11-151-5/+24
| | | | | | | | | | 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-13/+19
| | | | 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.
* Bunch of improvements to the query console, including:stuconnolly2009-11-141-1/+1
| | | | | | | | | | | | | - New connection column (been meaning to add this for a while) - Display table view column headers - Enable table view text cell line truncating - Allow table view columns to be re-ordered - The table view now respects the display table view vertical grid lines preference - Support for including the connection when saving messages to a file - Support for showing/hiding the connection column - Increase table view row height to match that of all others - Display message time stamps using the user's system wide medium time format
* Set keyboard shortcut for Delete button in "Delete Rows" alert to command D.avenjamin2009-11-091-1/+2
|
* - Support nested task levels to allow tasks to overlaprowanbeentje2009-11-081-16/+38
| | | | | | | - Thread history loading, thus using the nested task elvels and fixing history interaction in recent builds - Thread initial database loads - Improve progress indicator slightly
* • allow editing (INSERT/UPDATE) of data if Content table's view encoding ↵Bibiko2009-11-051-20/+40
| | | | | | is set to "UTF-8 via Latin1" by changing the query/connection's encoding to Latin1 temporarily • replaced 'int' to NS(U)Integer
* In the delete table row confirm dialog give the 'Cancel' button the key ↵stuconnolly2009-11-051-0/+6
| | | | equivalent of return in order to be consistent with other data deletion dialogs.
* - Alter query start/stop notifications to apply to only the originating ↵rowanbeentje2009-11-051-7/+7
| | | | window, regardless of key state, by passing in and looking for the table document instance
* - Improve stability when flipping between tables with the content view selectedrowanbeentje2009-11-041-11/+12
|
* - Add task support to all the main interface viewsrowanbeentje2009-11-041-179/+260
| | | | | | | | - 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
* - Revert all threaded table loading in TableContent, albeit leaving task ↵rowanbeentje2009-10-301-47/+13
| | | | functionality in place. This addresses r447, and threading will be reimplemented at a per-task level in the near future.
* Replace the multiple occurrences of hard coded toolbar identifiers for the ↵stuconnolly2009-10-281-2/+2
| | | | main toolbar with constants.
* - When performing threaded data loads, no longer disable the tables and ↵rowanbeentje2009-10-271-4/+13
| | | | instead prevent selection/editing/sorting in code; this prevents the tableviews from going grey during the load and minimises flicker and loss of focussed elements.
* - Set up TableSource to respond to task notifications to prepare for ↵rowanbeentje2009-10-271-4/+10
| | | | | | | 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
* - Apply new document task support to the Custom Query tab, and run all ↵rowanbeentje2009-10-231-8/+9
| | | | | | | | custom queries in a background thread with the task interface active. - Rework custom query result processing to allow display of results as they come in - Fix a memory leak
* - Improve table and task redrawing during threaded table content loadsrowanbeentje2009-10-221-7/+17
| | | | | - Correctly update the table content count when duplicating a row, and cancelling the add. This addresses issue #440.
* - Improve responsiveness/speed when loading table content by not forcing ↵rowanbeentje2009-10-211-1/+1
| | | | table redraw on new data, and increase the accuracy of the determinate progress as forced redraws are no longer an issue
* Initial work on threaded task, with an implementation of Table Content view ↵rowanbeentje2009-10-201-53/+146
| | | | | | | | | data loading: - Removal of AMIndeterminateProgressIndicatorCell, and addition of a custom fork of YRKSpinningProgressIndicator which fixes bugs, adds threaded drawing, and adds a determinate mode. - Addition of a task system within TableDocument, triggering display of a large central progress indicator and stopping the window from being interacted with in any way that would cause a query while the task is running. - Add threaded TableContent content fetching, including use of the new task system and determinate progress bar; make fixes to improve threading stability and interaction.
* Some UI tidying up.stuconnolly2009-10-191-2/+2
|
* - Update the row count a bit more intelligently when the table content is ↵rowanbeentje2009-10-171-0/+26
| | | | LMITed or FILTERed but the table content is increasing. This addresses Issue #421.
* Replace the use of hard coded preference keys with constants to prevent ↵stuconnolly2009-10-171-61/+61
| | | | issues such as the one fixed in revision 1419. All future preference usage should be done so using these constants.
* • fixed NSString pointer reassignment in SPArrayAddition's method ↵Bibiko2009-10-161-1/+25
| | | | | | | 'componentsJoinedAndBacktickQuoted' • improved deletion of rows in tables which have no primary keys - check for duplicated rows first; if no duplicates are found use all columns as 'primary keys' and delete the rows via … WHERE (a='…' AND b='…') OR (a='…' AND b='…') OR …
* - Improve on r1423 by avoiding stringWithFormat: within the query ↵rowanbeentje2009-10-161-10/+15
| | | | | | | | construction loop, enormously reducing memory usage in big loops - Use 64k chunks instead of 256k chunks - seems to give *much* better performance, possibly due to MySQL parsing/cache sizes (?) - When restoring the query console to allow updates again after a loop, trigger a refresh of the view if the console is visible
* • if a table has more than one PRIMARY KEY delete the rows à la DELETE ↵Bibiko2009-10-161-5/+69
| | | | | | | FROM `table` WHERE (`prikey1`='…' AND `prikey2`='…') OR (`prikey1 `='…' AND `prikey2`='…'); - changed error messages slightly while deletion
* • fixed SPArrayAdditions method 'componentsJoinedByCommas' to use a ↵Bibiko2009-10-161-17/+66
| | | | | | | | | | | | | mutable string to avoid crashes if array has a very large number of items (malloc error due to reassigning a NSString pointer) • added to SPTableData method - (NSArray *) primaryKeyColumnNames - returns all column names which are set as PRIMARY KEYs - return nil if no PRIMARY KEY is set • improved the deletion of rows - if current table has only one PRIMARY KEY field delete all rows via DELETE FROM table WHERE pri_key IN (…) whereby the deletion query will be splitted into 256k chunks Note: line 1790ff It has to be implemented a workaround for tables with more than one PRIMARY KEY – maybe via DELETE FROM table WHERE ( (pri_key1='…' AND pri_key2='…') OR (… AND …) OR … ) splitted in 256k chunks as well
* nullValue preference key should be NullValue, which was preventing the ↵stuconnolly2009-10-161-6/+7
| | | | editing of NULL fields in the editor sheet.
* • fixed issue that tables without primary key and Pref is set to ↵Bibiko2009-10-161-8/+12
| | | | | | | | LoadBlobsAsNeeded are not editable • fixed issue if user tries to delete a row from a table without a primary key and Pref is set to LoadBlobsAsNeeded that a warning comes up and the table data keep unchanged • if an error occurred while deleting rows reload the table data automatically for safety reasons • fixed data cell class detection for returning argumentForRow: (typo after changing the internal logic)
* • fixed issue for closing the sheet for deleting/adding row(s) explicitly ↵Bibiko2009-10-151-13/+15
| | | | | | | | | | due to the fact that SP would crash if an error alert sheet follows • fixed NULL value detection in method 'argumentForRow' Notes: - isSPNotLoaded check has to be implemented in line 1658 - hide blob data "(not loaded)" can be applied for tables which have no primary keys - we have to check the code again here
* • added the chance to set "allowConsoleUpdate"Bibiko2009-10-151-21/+37
| | | | | | | | - if set to YES the Console Log won't be updated after adding a new message even if the window is visible; this is useful if SP has to execute a large number of queries • first steps to increase the deletion of a large number of rows in the Content pane - removed deprecated 'selectedRowEnumerator' - set Console Log's 'allowConsoleUpdate' to NO if more than 10 rows should be deleted - instead of adding the successful deleted row indexes into a new array delete these indexes from the selectedRows NSIndexSet
* - Allow link arrows for foreign key links to work when used on a column ↵rowanbeentje2009-10-101-12/+27
| | | | with a foreign key link within the same table - this improves compatibility for Issue #428.