aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TablesList.m
Commit message (Collapse)AuthorAgeFilesLines
* When duplicating table, but not its contents strip out any occurrence of a ↵stuconnolly2009-10-021-1/+8
| | | | present AUTO_INCREMENT value. Fixes issue #391.
* When duplicating a table strip out the names of any occurrences of InnoDB ↵stuconnolly2009-10-021-0/+7
| | | | foreign key references as the names must be unique. MySQL will create the new names based on the new table name. Fixes issue #398.
* • first implementation of a Content Filter EditorBibiko2009-10-011-5/+5
| | | | | | | | | | | | | | - 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
* - When adding tables, use standard selection update methods rather than ↵rowanbeentje2009-09-281-30/+2
| | | | custom (and partial) code; fixes issues of showing old columns/data from the previous table when creating new tables.
* • fixed issue if after displaying a sheet for renaming/duplicating/adding ↵Bibiko2009-09-241-11/+47
| | | | | | | | | | a table an error sheet will be ordered out (order out the first sheet explicitly in beforehand) - this solves issue 418 • improved table name check for renaming/duplicating/adding a table - it checks for trailing white spaces since 'foo ' is not valid - it checks for length - it checks whether the entered table name doesn't occur as table/view name in the current database (case-insensitively and only while entering the name in sheets)
* • fixed (hopefully) : While adding all procedures and functions do check ↵Bibiko2009-09-031-1/+3
| | | | for mysql errors - if information_schema is not accessible for some reasons omit adding procedures and functions silently
* - Fix exception/hang when an error occurs when deleting a table or tablesrowanbeentje2009-09-031-20/+36
| | | | | | - Improve error messages encountered when deleting multiple tables, asking whether to stop or continue; also now shows all errors, not just the last (if it showed any!) - Fix various exceptions caused by the table list attempting to redraw while the underlying data is being changed
* • simplified and unified the issue to set the title of a tableWindowBibiko2009-09-021-13/+10
| | | | | | | | | | | | | | - everything will be configured in [TableDocument displayName] - to update the title call [TableDocument setTitle:[TableDocument displayName]] - this removes dozens of lines • first steps to support more the document-based approach ( a document is nothing else than a connection with view properties and preferences ) - renamed/added/changed in Main Menu items into "New", "Open", "Save", and "Save As" - if user opened a spf file -> fileURL will be set - "Save" will save the current connection/view data according to the "Save As" setting - ie if one saved a doc with do not "Remember window state" - "Save" won't save the window state; to enable this hit "Save As" [this works for encrypted file data as well] - if the current doc was opened from file and the user closes it or quits the entire app all connection/document-based preferences (up to now query favs and history) will be updated silently [not yet implemented fully in CustomQuery] [works for encrypted file as well] • delete saveSPFAccessory view from DBView since it was outsourced • fixed some issues for the NSSecureTextField in the Save accessory panel (but still a warning appears)
* • further improvements to restore a SP session from spf fileBibiko2009-08-231-6/+6
|
* - The add, rename and copy table sheets should not block the main thread ↵stuconnolly2009-08-181-463/+504
| | | | | | | | (part of issue #357). - Improve the consistency of destructive confirmation dialogs by making the remove field and index dialogs default button 'Cancel' with a key equivalent of return. - Disable the remove field button when the currently selected table only has one field, removing the need for the extra check (and subsequent dialog) when the user attempts to remove a field.
* Fix some MainMenu references by index.mltownsend2009-08-111-1/+1
|
* - Fix some small memory leaks when changing tablesrowanbeentje2009-08-041-0/+3
| | | | | - Fix the history navigation to correctly switch across databases without invalid history states
* • button tooltip for "Show / Hide Table Information" toggles according to ↵Bibiko2009-08-021-0/+4
| | | | | | | its status • after editing a field in Custom Query table scroll to last selected row after data refreshing - (TODO: should be improved in near future)
* - Fix an errant NSLog in TableSourcerowanbeentje2009-08-011-0/+3
| | | | | | - Improve and make consistent state saving in TableContent; now saves filters and scroll position mor reliably on refresh/edit, and supports remembering and restoring which rows were selected - Significantly improve table history - only create entries for tables switches or filters, only remember 50 items, and save view/filters/scroll position/selections in table content view
* - Add an initial barebones version of the history controller, with a basic ↵rowanbeentje2009-07-301-0/+2
| | | | toolbar item to navigate backwards and forwards. TBC!
* - Added Splitview delegate method to hide the drag handle on the Table Info ↵avenjamin2009-07-291-0/+19
| | | | pane and Filter view.
* - Fix "endSheet:returnCode: requires a non-nil sheet" log lines during importsrowanbeentje2009-07-281-0/+6
| | | | | | - Enable threaded animation for import/export progress bars as it has minimal overhead and looks nicer - Fix exceptions caused by tablesList drawing during imports
* - Clear selection if user is filtering table list with multiple tables ↵rowanbeentje2009-07-281-4/+7
| | | | selected, to avoid issues
* Improve TablesList significantly:rowanbeentje2009-07-281-365/+652
| | | | | | | | - If there are twenty or more tables, show a table quicksearch/filter at the top of the list, and update the rest of the code to match. This addresses issue #178. - Select tables and views alphabetically by user's current locale (instead of default MySQL "A B C a b c") - When adding or duplicating tables, insert them at the correct point - Fix a number of minor display bugs caused by incorrect interaction with the tables list caches
* - Tweak table information panel to show scrollbars if it's resized to a ↵rowanbeentje2009-07-261-0/+25
| | | | | | | | position that would hide content - Store collapse state of table information panel in preferences - Apply a double fix for BWSplitView/NSSplitView+BWAnchoredButtonBar not informing delegates of resizes - correctly inform original BWSplitView delegates of resizes, and allow BWAnchoredButtonBar registered delegates to recieve the original split view resize notifications. This fixes database menu resizing in synch with splitview resizing for improved/consistent look and feel.
* Merge framework integration branch back to trunk. Summary of changes:stuconnolly2009-07-211-9/+7
| | | | | | | | | | | | | | | - Includes all custom code from subclasses CMMCPConnection and CMMCPResult, meaning they have subsequently been removed from the project. - All previous Sequel Pro specific code in the above subclasses has been removed in favour of the delegate (currently set to TableDocumet) informing the framework of such information. - All references to CMMCPConnection and CMMCPResult have subsequently been changed to MCPConnection and MCPResult. - Framework includes MySQL 5.1.36 client libraries and source headers. - Framework is now built as a 4-way (32/64 bit, i386/PPC arch) binary. - All import references to <MCPKit_bundled/MCPKit_bundled.h> have been changed to <MCPKit/MCPKit.h>. - New script 'build-mysql-client.sh' can be used to build the MySQL client libraries from the MySQL source. See the script's header for a list of available options or run it with no arguments to display it's usage. Note that there are still a few changes to be made to the framework with regard to removing Sequel Pro specific calls to the delegate. These however can be made later on as they have no effect on functionality and are merely design changes. Also, note that any future development done on the framework should be made to be as 'generic' as possible, with no Sequel Pro specific references. This should allow the framework to be integrated into another project without the need for SP specific code.
* - When selecting tables - eg from a foreign key link - fall back to a case ↵rowanbeentje2009-07-181-1/+10
| | | | insensitive match if a full match fails, as MySQL can return foreign key references as lowercase rather than actual case
* Add the ability to navigate between tables via foreign key relationships, ↵rowanbeentje2009-07-181-0/+24
| | | | | | | | | addressing the first part of #209: - For the first column linked by each foreign key, display a link arrow within the table cell - When clicking on the link arrow, select the reference table and set the table filters to select the clicked value - Also uses the table cell subclass to allow the entire cell to be editable, not just the contained text (addresses #250)
* • fix for completion in CustomQuery editorBibiko2009-07-141-0/+72
| | | | | | | - now the gathering of suggestions does not query the MySQL connection, instead it uses the TableList/TableDocument tableView data as a kind of cache - this approach should improve the speed for slow server connections TODO: auto-update for TableList and Database List resp. (it could happen that an other user changed the name of a table/db meanwhile)
* Restore the position of the buttons on the remove table and truncate table ↵stuconnolly2009-07-021-4/+16
| | | | confirmation dialogs, but change the cancel button to the have key equivalent of return.
* When displaying the add new table sheet use SPDatabaseData to get the ↵stuconnolly2009-07-011-6/+5
| | | | available storage engines instead of the information_schema.engines table, which doesn't exist in versions other than MySQL 5.
* - Make changes to the table structure flush the appropriate table data cachesrowanbeentje2009-06-241-0/+8
| | | | | | - SPTableData's columnWithName: now updates caches as necessary to avoid issues - Mark the extended table info view (particularly the CREATE TABLE syntax) as requiring update following table structure changes
* • added separate Menu "Context Menu (Table List)" to DBView.xibBibiko2009-06-241-1/+55
| | | | | | - it's used for the contextual menu for the Table List • fixed: contextual menu in Table List
* Implement some of the points suggested in issue #309:stuconnolly2009-06-241-14/+14
| | | | | | - All menu items which show a panel of some kind before completing the action need to have "..." after the menu item name. - All menu items which do something destructive (drop table, truncate table) need to default to the CANCEL button in their alert message.
* • tried to unify the displaying of error messages (mainly converted them ↵Bibiko2009-06-241-7/+13
| | | | | | | | into sheets) • changed the alert for "Truncate table" - "Are you sure you want to delete ALL table records in the..." • added BWToolkitFramework copyright notice to credits.rtf
* • added to SPArrayAdditions.h: NSArrayObjectAtIndex() inline functionBibiko2009-06-181-8/+9
| | | | | | | | | - id o = NSArrayObjectAtIndex(anArray, index) :== id o = [anArray objectAtIndex:index] - this speed up it ~3µs per call - replaced that inline function for such calls within loops to speed up them • used IMP function pointers for keepAlive calls within queryString: • set -O3 (Fastest) compiler option • allow in preference pane "Tables" to set the Limit up to 50000
* • different log message for changing max_allowed_packet for increasing it ↵Bibiko2009-06-151-0/+1
| | | | | | | | and for resetting it (a bit more transparent info) - now also check the delegate if queryGaveError: method is implemented • while adding/updating a row to the db Table Content's pane now indicates that process better via spinning wheel • after TRUNCATE TABLE reload that table content
* Implementation of enhancement #273: Allow user to truncate table by right ↵stuconnolly2009-06-151-45/+94
| | | | clicking.
* • cleaned code for the case that the user selects a view which causes a ↵Bibiko2009-06-101-3/+10
| | | | | | | | | MySQL error while retrieving data - [SPTableData tableEncoding] returns nil if no encoding can be found - [TableList tableViewSelectionDidChange:] checks in beforehand for a valid table encoding; this avoids to get the same MySQL error message twice and cleaned the structure view • if a MySQL error occurred while retrieving table data for the content view set the content view to a defined and clean status • bound TableContent's filterButton to DBView.xib to disable it if an error occurred (otherwise the status bar shows unexplainable results )
* • reload table list, database pull-down menu according to user's ↵Bibiko2009-06-051-6/+4
| | | | | | | | | statements in the Custom Query editor if necessary - if statement begins with: use, create, alter, rename, drop • reload table list, database pull-down menu according to imported statements • sped up "Import MySQL Dump" • fixed some tiny issues of the last commit
* Fixed some memory leaks found using llvm/clang. There are still some to fixbamse162009-06-051-5/+10
|
* • added: the "Show Create Syntax" window now follows the selection in the ↵Bibiko2009-06-041-0/+6
| | | | | | table list if it was already opened • commented out the NSLog "not parsed" in SPTableData.m
* Redesigned table information pane.stuconnolly2009-05-271-6/+6
|
* • added key-binding for RETURN to "Duplicate" button in the "duplicate ↵Bibiko2009-05-261-1/+12
| | | | | | table sheet" via delegate method controlTextDidEndEditing: • improved controlTextDidEndEditing: to recognize only the RETURN/ENTER key
* • added key-binding for RETURN to "Add" button in the "add table sheet" ↵Bibiko2009-05-261-1/+4
| | | | via delegate method controlTextDidEndEditing:
* When adding a new table allow the user to specify the storage engine used.stuconnolly2009-05-191-0/+21
|
* More header updates for source files, including Subversion Id property.stuconnolly2009-05-191-1/+2
|
* Add most of the improvements made to the rename table sheet to the duplicate ↵stuconnolly2009-05-181-21/+27
| | | | table sheet.
* • added the possibility to rename/duplicate functions and proceduresBibiko2009-05-181-60/+185
| | | | - in renameTable: AND in tableView:setObjectValue:forTableColumn:row:; i.e. the user can simply double-click at a table item to rename func/proc as well
* • removed NSLog for logging the mysql serverMajorVersion etc.; it causes a ↵Bibiko2009-05-181-3/+1
| | | | crash if one changes the database
* • improved renameTable:Bibiko2009-05-181-16/+53
| | | | | | | | | | | | - support for renaming a view - sheet listens to RETURN key - sheet text field is set the selected name as default - if name == selected name disables Rename button - sheet message according to table type • cleaned action menu - if more than one item is selected hide non-relevant menu items • delete file references for SPScriptEngine.* from Xcode project due to the fact that these files are not found since the last commit
* - hide 'rename' context menu if selection is not a tablemtvee2009-05-181-2/+8
| | | | - added methods to CMMCPConnection to determine server major,minor,release version
* - added Unit Tests target to project and a couple of prelim tests to get ↵mtvee2009-05-181-0/+1
| | | | things rolling
* Add the ability to rename tables. This could potentially be enhanced to ↵stuconnolly2009-05-171-9/+69
| | | | allowing renaming views, which is supported as of MySQL version 5.0.14, but requires some version detection to take place.
* • fixed bug if the user selected a table in the table list and performed ↵Bibiko2009-05-161-76/+79
| | | | | | "Import" => SP crashed due to the labeling of the gear menu items based on no selected table; this should be fixed now • some code cosmetics