aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableContent.m
Commit message (Collapse)AuthorAgeFilesLines
* Improved index checking when using arrow key navigation. Potential fix for ↵jakob2010-04-161-6/+14
| | | | http://spbugs.com/l/120
* - changed the query locking mechanism for MCPConnection to be more thread ↵jakob2010-04-161-7/+3
| | | | | | | | safe. From now on, always use [self lockConnection] rather than [queryLock lock], independent of what thread you are running on - A warning is written to the console when the connection is unlocked multiple times (to identify potential race conditions) - modified MCPStreamingResult to ensure it only closes the connection once - added a check to prevent arrow key navigation past the last row
* Clicking the duplicate row button now correctly sets auto_increment fields ↵jakob2010-04-141-2/+4
| | | | to NULL and loads blobs
* - Wrap TableContent's loadTableValues in an autorelease pool; this fixes ↵rowanbeentje2010-04-131-0/+5
| | | | connection locking issues, addressing Issue #634
* - enabled up/down arrow key navigation (see #633)jakob2010-04-131-11/+45
| | | | | - enter key ends editing and saves row now rather than going to the next cell - fixed a bug that occured when clicking the delete/duplicate button while editing a cell
* Review usage of notifications, afterDelay: and waitUntilDone:NO calls:rowanbeentje2010-04-121-1/+1
| | | | | | | - Add more calls to deregister watchers to fix crashes to closing threads or objects - Fix a couple of memory leaks - Alter a few calls to be performed on main thread (afterDelay: operates on the thread is is called on) - this fixed database reloading after import and field/index deletion error sheets
* Default the reseting a table's auto increment value to on when removing all ↵stuconnolly2010-04-031-1/+1
| | | | rows from a table.
* - Fix an intermittent crasher - occurring most often when sorting tables - ↵rowanbeentje2010-04-021-1/+1
| | | | by using copies of data store objects when the data store is being updated. This addresses http://log.sequelpro.com/view/20 and http://log.sequelpro.com/view/88
* Although the table content field drop down should always be populated and ↵stuconnolly2010-04-011-1/+1
| | | | selected, make sure to check that the value returned is not nil/NULL before we perform any regex with it. Fixes exception http://log.sequelpro.com/view/95.
* Tidy up imports and fix 'Reverse Sort Order' when sorting connection ↵stuconnolly2010-03-311-2/+1
| | | | favorites (Thanks Hans).
* - Make [MCPConnection getLastErrorMessage] more consistent by always ↵rowanbeentje2010-03-251-7/+7
| | | | | | | 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
* - Add a new selectDatabase:item: method to TableDocument, to centralise ↵rowanbeentje2010-03-241-1/+1
| | | | | | | | | | code for selecting databases and tables. Clean up database selection to use this new method, and avoid reloads when re-selecting the same database. - Convert the history controller to use this new call. This fixes history behaviour when a table list filter was active. - Convert the (hidden) navigator to use this new call. This fixes timing issues. - Make some thread safety tweaks to TablesList. - Change TablesList selectTableOrViewWithName: to selectItemWithName:, including procs etc.
* • CSV ImportBibiko2010-03-221-1/+1
| | | | | | | | - if a parsed row in the csv file doesn't have the same number of columns as the first row fill the missing columns with SPNotLoaded to allow while importing that these missing data can be replaced by the table column's DEFAULT value - fixed tiny issue for field mapper sheet to display the correct tooltip for default values • SPTableData - ATTENTION: changed the object for returned key 'default': if its value is NULL now it returns a [NSNull null] object - changed instances to handle this [NSNull null] object (must be checked)
* - Add a new SPMainThreadTrampoline NSObject category, allowing all ↵rowanbeentje2010-03-201-15/+16
| | | | | | | | | | | | | | | NSObjects to easily proxy commands onto the main thread with any number and type of arguments. - Use the new trampoline and other thread safety tweaks to hopefully address a number of what appear to be threading issues: http://log.sequelpro.com/view/20 http://log.sequelpro.com/view/32 http://log.sequelpro.com/view/41 http://log.sequelpro.com/view/42 http://log.sequelpro.com/view/55 http://log.sequelpro.com/view/64 http://log.sequelpro.com/view/65 http://log.sequelpro.com/view/66
* Present a warning to the user when attempting to print the current table's ↵stuconnolly2010-03-181-8/+10
| | | | content view which exceeds a set number of rows. This number is currently set to 1000 which can be changed via the hidden preference key 'PrintWarningRowLimit'. The approach to cancelling the print HTML generation thread may also need to be re-implemented to ensure that it is killed straight away, something that is currently not possible using NSThread. Rowan suggested using pthreads instead, but this should be discussed in terms of potential memory leaks and stability.
* - Make a number of changes to attempt to improve disconnection/quit ↵rowanbeentje2010-03-161-3/+3
| | | | | | | | | 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-0/+1
| | | | variables, a few leaks, and additional nil setting/checking to prevent overreleases or releases of random areas of memory.
* - Fix an exception when following a foreign key relationship to a null ↵rowanbeentje2010-03-131-4/+10
| | | | | | | value in another table (this addresses http://log.sequelpro.com/view/53 ) - Fix filtering within the same table when following foreign key relationships
* • Select Content Filter ^⌘FBibiko2010-03-081-2/+17
| | | | | - select first textfield for 1 or 2 argument(s); if no argument field is selectable select compareField - ensure the focus setting by calling "makeContentFilterHaveFocus" via performSelector:afterDelay
* When cancelling a table sort operation remember to end the threaded task to ↵stuconnolly2010-03-081-0/+1
| | | | ensure the bezel and spinner are removed from view. Fixes issue #570.
* Add a new 'Filter Content...' menu item to the 'Table' menu that switches to ↵stuconnolly2010-03-081-0/+10
| | | | the content view and places the focus on the filter field.
* - Fix an exception/crash when content edit errors occur and the user ↵rowanbeentje2010-03-031-2/+2
| | | | requests changs be discarded
* • Reset AUTO_INCREMENT in Table Info Pane uses inline entering of the new ↵Bibiko2010-02-231-3/+21
| | | | | | | | | | 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
* Fix Issue #574 (foreign key links not working after first use):rowanbeentje2010-02-231-5/+29
| | | | | | - Move foreign key reference loading into it's own task and set state modification markers to allow it to override the table state history - Rename modifyingHistoryState to modifyingState now the usge has broadened slightly
* • removed initial transition of insertion NSNull into table's dataSource ↵Bibiko2010-02-191-3/+8
| | | | from last commit r1824 since that part should be moved maybe into SPTableTextFieldCell
* • fixed color setting for editing a table cell which is set to NULL if ↵Bibiko2010-02-191-9/+6
| | | | | | | | table columns are reordered by the user • initial transition to insert via - up to now - ^⇧N a [NSNull null] object into the table's data source directly without parsing a possible @"NULL" string - it's a first test - and works only for CMCopyTable subclassed tables
* • fixed bug for Content Filter Editor, now $CURRENT_FIELD will be replaced ↵Bibiko2010-02-191-3/+2
| | | | correctly if no ${} argument is passed
* • added the chance to the user-defined Content Filter Editor to specify ↵Bibiko2010-02-191-17/+38
| | | | whether the leading <field> placeholder should be suppressed or not in order to be able to write a filter like "LENGTH($CURRENT_FIELD)>${}"
* - Rework SPSQLParser, extending DELIMITER support into all the original ↵rowanbeentje2010-02-051-0/+1
| | | | | | | | | | | 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)
* • improved error handling in Structure View for adding/renaming/removing a ↵Bibiko2010-02-031-2/+7
| | | | | | | 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
* • Content Table and Query Editor table's tooltip are displayed by using ↵Bibiko2010-01-311-1/+8
| | | | | | the same font/size as the table cells • CMTextView: make sure that some methods are never called if the CMTextView is set to 'not ediable'
* • CMTextView's colours are set via observer, live changed in editable ↵Bibiko2010-01-301-12/+8
| | | | | | | | textviews • added Preference setting "Table font" in "Table" pane to set the table font/size for all result tables (Content, Custom Query) • added to SPTableView the method setFont: • fixed the initialisation of vars in CMTextView (fixes the displaying of create syntax)
* Rework CMCopyTable copy functionality and related code:rowanbeentje2010-01-301-1/+2
| | | | | | | | | | - Reverse the effects of the r1664/r1690 combination, restoring the original link from CMCopyTable to the underlying data source - Adapt the code to retrieve information from the new SPDataStorage; update SPDataStorage as necessary if underlying data changes - Refactor and speed up various checks and loops for speed and logic improvements - Ensure the binary-encoded TEXT data is hex encoded rather than retrieved as "<123ABC 123ABC...>" NSData representations - Fix some memory leaks This resolves Issue #533 and the original "Copy as SQL" issue
* • suppress the display of table cell tooltips if TableDocument isWorking ↵Bibiko2010-01-301-1/+1
| | | | to avoid unstable tooltip status
* - Bugfix: when the number of table columns for a content result set no ↵rowanbeentje2010-01-301-3/+18
| | | | longer matched the internal table representation, table storage exceptions would occur. Additional checks are now made against the column count; if a content result set is retrieved with an unexpected number of columns, the result set is discarded and a full table refresh is triggered to restore the state.
* Improve Disconnection on connection loss:rowanbeentje2010-01-241-4/+8
| | | | | | | | | - Set error strings on MCPConnection on user disconnect to allow existing error chcking to catch the state - Improve close behaviour from threads - Improve window close behaviour and appearance - Add new checks for disconnection in one or two crash-prone locations This addresses Issue #531, one of Issue #532, one of Issue #539, and probable reported crashes on Issue #541.
* 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
* - Remove some unintentionally committed debugrowanbeentje2010-01-181-2/+0
|
* Add a new SPDataStorage class, and use it in TableContent and CustomQuery:rowanbeentje2010-01-171-62/+56
| | | | | | | | - SPDataStorage is a class designed for a 2D array of fixed-width data storage, replacing the current method of nested NSMutableArrays. NSFastEnumerator compatible. - Overall memory overhead for table storage in memory reduced by 1.2-1.4x - this almost gains back the large memory jump seen for 64 bit - Some operations (adding data, retrieving a single cell's data) are faster than nested NSMutableArrays; some operations (requesting a row as an NSArray) are slightly slower as the data needs to be converted, but overall result is a slight speed gain. (- Could be used in future to store SQL results in C datatypes, avoiding very high NSObject overhead for numbers and short strings)
* Replace COUNT(*) with COUNT(1) which is usually faster, and much faster in ↵bamse162010-01-141-1/+1
| | | | certain conditions
* - Fix incorrect pagination task text ("Filtering table...") when no ↵rowanbeentje2010-01-121-9/+24
| | | | | | | filtering is occurring, just pagination - If the table count is estimated (eg InnoDB), but the end is reached via pagination, make the row count accurate based on the known number of rows
* • fix for i525: do not escape the \ for \_ or \% and changed "contains" 's ↵Bibiko2010-01-111-5/+6
| | | | | | | behaviour to escape _ % automatically since it could be confusing to the user because it uses LIKE '%...%' • reimplemented: scroll to newly added row in Content View
* Improve row deselection and error handling in Table Source and Content views:rowanbeentje2010-01-091-6/+4
| | | | | | | | - 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-73/+73
| | | | | | | 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-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.