aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableContent.m
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Improve handling of NULL and "(not loaded)" placeholders:rowanbeentje2009-10-101-110/+81
| | | | | | | - Rewrite TableContent and CustomQuery to store NSNull and SPNotLoaded objects in the data arrays where appropriate, rather than providing string conversion on data load. Faster, simpler comparisons and processing code, slightly lower memory usage, and reduces the chance of bugs caused by inadvertantly processing the string values; we can now also distinguish easily between NULL and "NULL" etc, and further paves the ground for image representations of special values. - Fix a bug caused by consistent value reloading when editing BLOB/TEXT columns with deferred loading - if editing a row and revisiting an edited cell, the original value was restored; the original value is now only loaded once. This addresses the rest of Issue #423.
* - Ensure that blob and text fields which are loaded on-demand never have ↵rowanbeentje2009-10-031-7/+20
| | | | placeholder values written to database. This addresses the data corruption part of Issue #423.
* • first implementation of a Content Filter EditorBibiko2009-10-011-8/+15
| | | | | | | | | | | | | | - user-defined content filter can be saved globally (Prefs) or in SPF files - BETA - further tests are needed due to complexity - SPQueryController now handles the local user-defined content filters - tooltips are now generated automatically if not defined explicitly (incl. if $BINARY placeholder was used) • if user added local query favorites or content filters to an Untitled document and s/he wants to close it the standard sheet will be displayed (Don't Save - Cancel - Save) - due to that changed old [TableDocument displayName] to 'displaySPName' to be conform with Cocoa • changed behavior while importing query favorites - now they will append at the list (not inserted after selected row - makes more sense) • introduced to history filter dict the key 'menuLabel' which will be set to [TableContent tableFilterString] for displaying the history menu title and simplified the SPHistoryController logic for that • minor code changes
* • further progress on the Content Filter EditorBibiko2009-09-301-4/+56
| | | | | • fixed issue for "Add" a new favorite in SPQueryFavoriteManager: - save pending changes in the query textView in beforehand
* - Correctly release and reset the sort column when deselecting tables or ↵rowanbeentje2009-09-291-0/+4
| | | | selecting single tables after multiple tables are selected. This addresses Issue #372 and probably Issue #365
* - When editing a row in a table with "on update CURRENT_TIMESTAMP" set for ↵rowanbeentje2009-09-291-11/+15
| | | | a column, if that column value hasn't been changed by the user apply the CURRENT_TIMESTAMP appropriately. This addresses Issue #416
* • fixed an issue of double-loading user-defined filtersBibiko2009-09-281-1/+29
| | | | | | • introduce a new placeholder $BINARY to the filter definition - if user presses ⇧ while invoking the table filter and a filter had defined that placeholder the search will be case-sensitive; otherwise the placeholder $BINARY will be simply removed to search case-insensitive - added tooltip for these string filters in ContentFilters.plist
* • improved and fixes escaping of filter argumentsBibiko2009-09-281-3/+31
| | | | | | | | - 'is (not)' and 'contains (not)' are now defined as: take the argument literally, ie % and _ will be escaped automatically - in string fields one can look for \n , \r , \t - added LIKE and NOT LIKE operators to strings to be more transparent - a routine detects automatically whether a placeholder was wrapped into ' or " and if so ' or " will be escaped
* • rewrote the content filter logic:Bibiko2009-09-281-190/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - all default filters come from "ContentFilters.plist" which can be localized main structure: <plist> <dict> <key>number</key> <array/> <key>string</key> <array/> <key>date</key> <array/> </dict> </plist> filter item structure: [ ${} is a place holder for an argument ] <dict> <key>MenuLabel</key> <string>BETWEEN</string> <key>Tooltip> <string>a tooltip</string> <key>NumberOfArguments</key> <integer>2</integer> <key>ConjunctionLabels</key> <array> <string>AND</string> </array> <key>Clause</key> <string>BETWEEN '${}' AND '${}'</string> </dict> - if NumberOfArguments == 0 then start filtering automatically - now one can save his/her own filters in SP's preferences.plist (GUI follows soon) - fixed issue for filters requiring two arguments that pressing RETURN if one is in the second argument input field invokes "Filter" - added string operators: "IS EMPTY" and "IS NOT EMPTY" - fixed issue that now one is able to look for eg \n in string fields
* • changed the progress wheel updating behaviour while loading table data ↵Bibiko2009-09-261-8/+15
| | | | slightly to increase the loading speed; this is up to now a compromise between speed and user information, the progress wheel will be updated every ~15%
* Add back/forward history menu items to the view menu with the assigned ↵stuconnolly2009-09-121-1/+1
| | | | shortcuts of cmd+[ and cmd+].
* - Ensure table viewport is correctly restored for navigation history/SPF ↵rowanbeentje2009-09-071-0/+5
| | | | usage following TableContent cleanups in r1183/r1204
* • renamed SPQueryConsole to SPQueryController since it controls not only ↵Bibiko2009-09-031-2/+2
| | | | | | the query console but also query favorites and history application-wide - accessible via: [SPQueryController sharedQueryController]
* - Replaces uses of the deprecated selectRow:byExtendingSelection: with ↵rowanbeentje2009-09-021-3/+3
| | | | selectRowIndexes:byExtendingSelection:
* - Remove an NSLog I accidentally left in (and another found via a search)rowanbeentje2009-09-011-1/+0
| | | | | - Improve SQL parser streaming improvements for significant speedups and some very important bugfixes
* When editing blob/text fields and the LoadBlobsAsNeeded option is enabled, ↵stuconnolly2009-08-271-17/+17
| | | | load a blob/text's field content even if we are still editing the row. This prevents the placeholder value '(not loaded)' being displayed, giving the impression that it is the field's value. Fixes issue #385.
* - Fix NSLock console linesrowanbeentje2009-08-251-68/+68
| | | | | | | - Speed up table content processing a bit - Make the table content download/processing determinate where an approximate row count is available - Clean up table content source, assuming MCPStreamingResult will remain in use
* • further improvements to open/save spf filesBibiko2009-08-231-11/+30
| | | | | - rearrange invoking procedure for spf data if SP asks for passwords • fine-tuned and fixed table history for BETWEEN operator
* • corrected table history entries for operator BETWEEN (misunderstood ↵Bibiko2009-08-231-7/+15
| | | | logic firstly)
* • modified SPHistoryController to handle the new BETWEEN operatorBibiko2009-08-231-3/+14
| | | | • after changing the operator in TableContent set focus to first argument field
* Add support for the BETWEEN operator when filtering a table's content. ↵stuconnolly2009-08-211-54/+106
| | | | Implements issue #361. Note the sizing of the new controls still needs fine tuned.
* • first preparations to save the current connection window as SPF fileBibiko2009-08-211-0/+1
| | | | • added to TableContent's method filterSettings the dict key 'filterComparisonTag' in order to be able to rely on menu item tags instead on the title strings
* Experimental change to make table content browsing much faster:rowanbeentje2009-08-201-2/+39
| | | | | | - Use the new MCPStreamingResult in TableContent, replacing the old standard query/fetchResultAsArray. This appears to be much faster (and lower memory use) but I've left the old fetchResultAsArray in place for the time being until we see how we feel about it.
* • re-implemented tooltips for Content and Query tablesBibiko2009-08-201-30/+35
| | | | | - catch exceptions while retrieving the original table data while/before reloading/changing the table source data - 'image' is now set to autorelease
* • quick fix - disabled tooltips in Content and Query tables due to crashesBibiko2009-08-201-30/+30
|
* • SPTooltip: added type "image"Bibiko2009-08-181-12/+9
| | | | | - show images directly as a NSImage in a NSImageView (this decreases the memory usage enormously) • applied new tooltip invocation for image blob data in Content Pane and Custom Query table