aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableContent.m
Commit message (Collapse)AuthorAgeFilesLines
* • 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.
* - 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.