aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDocument.m
Commit message (Collapse)AuthorAgeFilesLines
* Rename TableContent to SPTableContent.stuconnolly2010-05-281-1/+1
|
* Rename TableSource to SPTableStructure.stuconnolly2010-05-271-1/+1
|
* Rename TablesList to SPTablesList.stuconnolly2010-05-271-3/+3
|
* Merge export redesign branch back into trunk.stuconnolly2010-05-241-1/+18
| | | | | | | | | | | | | | | | | | | | | Includes a completely redesign approach to all export data types based on the use of NSOperation subclasses. CSV, SQL, XML and dot export types are currently functional, while the source files for PDF and HTML export types exist they are to be implemented, but are currently hidden from the interface. Also includes the following: - Completely redesigned export interface. - The ability to customize CSV NULL values. - The ability to specify whether the UTF-8 BOM should be used in SQL dumps. - The ability to specify whether BLOB fields are output as hex or plain text during SQL dumps. Defaults to hex. - Exporting currently selected tables via the tables list context menu. Outstanding issues: - Not all progress indicators for all export types are functional (or functioning correctly). - A few issues related to the introduction of only exporting the content and create and drop syntax of specific tables during SQL dumps. Needs some serious testing and benchmarking to ensure it replicates the current export functionality.
* - Add support for progress indicator in tabsrowanbeentje2010-05-241-15/+3
| | | | | | - Hide Navigator menu option again - Remove accidentally committed debug
* Initial implementation of tabs:rowanbeentje2010-05-231-240/+370
| | | | | | | | - Addition of PSMTabBar framework - Rework away from a document-based TableDocument - Support tabs throughout the application - Add menu items for creating tabs, and add support for dragging tabs to different windows
* - Fix an issue when truncating tables using the right-click menu, by ↵rowanbeentje2010-05-221-6/+6
| | | | | | | | improving the truncation reload code and by removing a problem in TableContent tracking the active table name. This addresses Issue #700 and a number of crash reports. - Rename SPHistoryView* constants to SPTableView* constants and use them more widely rather than hard-coded tab indexes - Fix a problem preventing history navigation if a triggers view was the previous item in the history
* Review queryDbStructureWithUserInfo:rowanbeentje2010-05-151-3/+0
| | | | | | | | - Remove extra call when changing databases, avoiding double calls - Fix an error if the document has had no encoding set yet (addresses http://spbug.com/l/200) - Tweak db struture querying to work on MySQL 3 and 4.0 - Rework function to remove duplicated logic, and to address a number of valueForUndefinedKey: exceptions logged via the bug tracker
* - Corrected reloading of list of databases and list of tables; formerly, ↵drx7772010-05-101-4/+2
| | | | only the db list was reloaded, keeping the list of tables from the previously selected database
* - Update task progress spinner to draw on the main thread rather than a ↵rowanbeentje2010-05-091-1/+0
| | | | | | | | background thread; should fix a number of issues logged by the crash reporter - Update indicator code to merged master incorporating our changes, reworked and improved
* Rework alert sheets:rowanbeentje2010-05-091-9/+9
| | | | | | | - Change MCPConnection.m to no longer use a reference to tableWindow to attach sheets - instead use a delate error display method if available - Rework TableSource and TableContent sheetDidEnd methods into per-task methods rather than overloading contextInfo - Rework SPAlertSheets to perform actions on the main thread, with the loss of (unused) support for a didDismissSelector. This addresses a number of crashes logged by the crash reporter
* Prefill duplicate database name field with current database name.stuconnolly2010-05-031-1/+1
|
* For add/rename/duplicate DB: check new name input for an existing db name ↵drx7772010-04-291-3/+3
| | | | and disable OK button if it does.
* Changed appearance of copy/rename DB to match that of copyTable. drx7772010-04-291-3/+5
| | | | | Added the to be copied/renamed database name to the name input sheet. Added necessary outlets. Added the current db name as preset value in the rename input field. Renamed databaseNewSheet to databaseCopySheet and copyOnlyStructureButton to copyDatabaseDataButton and inverted behaviour of the button.
* Disable copy/rename database in menu, if no database is selecteddrx7772010-04-291-1/+3
|
* Disables copy/rename confirmation buttons in copy/rename sheet if no name is ↵drx7772010-04-291-0/+8
| | | | provided
* Only switch to the renamed/duplicated database name, if the action was ↵drx7772010-04-291-9/+11
| | | | successful. Caused an existing DB to be selected, after ren/dup failed because it exists.
* Now longer using [NSApp mainWindow] but a reference to the correct window ↵drx7772010-04-291-2/+2
| | | | for message sheets. It could have caused messages appearing in the wrong window.
* Duplicate/Rename DB: catch an unnecessary error message on canceling input ↵drx7772010-04-291-2/+6
| | | | sheet by checking the returnCode of the sheet.
* This changeset implements renaming and duplicating databases on a server. ↵drx7772010-04-281-2/+88
| | | | | | | | | | | | | | | | | | | Details as follows: * altered MCPConnection listTablesFromDB:like: to return NSArray * altered MCPConnection listFieldsFromTable:like: to use backtick quoted strings for table and fieldnames * added MCPConnection listTablesFromDB for a complete table list * added SPStringAdditions.h to various files to prevent warnings * added sheets for duplicate/rename DB in DBView.xib * added duplicate/rename menu items to MainMenu.xib * added outlets in TableDocument: databaseNewSheet databaseRenameSheet databaseCopyNameField databaseRenameNameField copyOnlyStructureButton copyDatabaseButton renameDatabaseButton * added methods in TableDocument: getConnection, copyDatabase, renameDatabase, _copyDatabase, _renameDatabase * added OCMock Framework for object mocking in tests * added group Others/DatabaseActions
* Enhance SPLogger by adding the ability to run leaks() against the ↵stuconnolly2010-04-241-2/+7
| | | | | | | | | application upon termination with the result being written to /tmp. To enable call setDumpLeaksOnTermination on SPLogger. Note, that SPLogger has been restructed to accommodate calling this method without writing the additional log file to the user's desktop. Could probably be enhanced a bit by someone with better C skills than me.
* changed many occurrences of "REMOVE" to "DELETE", eg. "DELETE DATABASE"jakob2010-04-221-1/+1
|
* When saving an SPF only save the socket if it's present. Fixes ↵stuconnolly2010-04-201-1/+1
| | | | http://spbug.com/l/137
* - Add a new couldCommitCurrentViewActions method to TableDocument, and ↵rowanbeentje2010-04-181-51/+50
| | | | | | | | standardise current view-commit-checks to use that - Add checking of that status to history navigation (fixing http://spbug.com/l/127 ) and window closing (fixing http://spbug.com/lr/263 ) - Improve thread safety/deferred actions in TableContent
* - Fix a bug in 10.5.8 where a background connection window would ↵rowanbeentje2010-04-171-1/+2
| | | | overrelease on crash, by moving from automatic/inherited window management for the task spinner to fully managed. This addresses http://spbug.com/l/4 .
* - Tweak the history controller to track the toolbar item visibility, and ↵rowanbeentje2010-04-151-2/+3
| | | | only update it when visible - this fixes crashes after the toolbar item is removed from the toolbar and then updated (eg http://spbug.com/l/114 )
* Review usage of notifications, afterDelay: and waitUntilDone:NO calls:rowanbeentje2010-04-121-1/+4
| | | | | | | - 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
* • renamed 'Open' button in 'Import from Clipboard' to 'Next'Bibiko2010-04-121-1/+1
| | | | • fixed 'Import from Clipboard' menu item validation to be disabled if no database is selected (thanks to avenjamin for pointing it out)
* Add a new SPFileHandle class to support gzip compression and writing on a ↵rowanbeentje2010-04-121-1/+0
| | | | | | | | | | | background thread, and integrate for SQL import: - Implement streaming reading of gzip-compressed files for SQL import - Support exporting SQL dumps into a gzip-compressed file - SPFileHandle supports the most-used subset of NSFileHandle commands for easy integration - Integrate zlib 1.2.4 for improved gzip streaming performance (and support for custom buffer sizes and file offset positions) This implements Issue #571 .
* Forgot to update Localizable.strings for previous commit.stuconnolly2010-04-111-2/+2
|
* • added "Import from Clipboard" ⌥⇧⌘IBibiko2010-04-101-2/+16
| | | | | | - sheet showing the first 4kB of pasteboard content and the SQL/CSV accessory view - pasteboard content will be saved as temp file and read by using the current table/connection encoding
* When displaying a table/view's create syntax in the extended table ↵stuconnolly2010-04-091-2/+2
| | | | information view or create syntax sheet remember to append a semi-colon. Fixes issue #629.
* - Improve .spf handling of blank passwords; allow empty passwords to be ↵rowanbeentje2010-04-061-4/+4
| | | | saved (this addresses http://spbug/l/75), and correctly restore empty passwords
* If user selects the Query Editor window set always the focus on the text ↵Bibiko2010-04-061-2/+2
| | | | view regardless if the content is empty or not, since it's very likely that the user wants to change it. This should solve i483.
* • ensure that the global schema structure data for completion are updated ↵Bibiko2010-03-311-1/+1
| | | | even if SP is not active
* • if document window will close sent a ↵Bibiko2010-03-311-0/+11
| | | | | | 'cancelPreviousPerformRequestsWithTarget' to the custom query editor to stop auto-completion and auto-help timer to avoid crashes after closing • improved some minor stuff for completion's re-invocation
* • querying for db structure is queued for the same connection to avoid ↵Bibiko2010-03-311-3/+2
| | | | | | | | | | | 'overlapping' access to global variables • after querying db structure write back data on main thread • completion list displays animated sync images if connection is just querying db structure data • fixed some minor issue for completion list • make sure that if last window of a connection is closed all relevant data will be removed from global variables Note: please test!
* - Improve error checking for various actions, particularly permissions ↵rowanbeentje2010-03-311-0/+22
| | | | errors (NULL data returned) for views and stored procedures. This should fix http://log.sequelpro.com/view/27 , http://log.sequelpro.com/view/57 , and the last of http://log.sequelpro.com/view/53
* • fixed several issue for completion listsBibiko2010-03-291-0/+10
| | | | | | | • improved gathering and caching of structure data coming from connection windows with the same connection • made the structure querying more stable against threading issues • moved getUniqueDbIdentifierFor from MCPConnection to SPNavigatorController to be up-to-date in all connection windows • improved detection if db structure querying should be performed or not (not yet finished)
* Add the ability to sort the connection favorites table view in the ↵stuconnolly2010-03-271-0/+6
| | | | preferences. Sort options are by name, host or type as well as the option to be sorted in reverse order. This implements issue #490.
* - When switching tables, correctly catch disconnections and suppress error ↵rowanbeentje2010-03-271-8/+0
| | | | | | | | | dialogs and related crashes - Move connection error sheet close method to the connection delegate - Tweak the information_schema db schema building query to be much faster on busy servers by amending the VIEW part - Set the connection lock to nil after releasing, coping with connection unlocks deferred on the main thread until after dealloc
* • navigatorBibiko2010-03-261-6/+3
| | | | | - fixed issue if different connection windows are connected to the same connection - prepared structure querying method to be able to add user info containing which table/db was changed if we know it to reduce the future parsing cost
* • Navigator and completion listBibiko2010-03-261-1/+7
| | | | | | - fixed issues for deletion of a db like remove all relevant items and refresh the navigator - simplified and minimized code and memory usage while querying the connection structure - whether a schema name is an unique db or table will be evaluated on run-time via allKeysofDbStructure
* • first steps to ease the structure querying for auto-completion and navigatorBibiko2010-03-261-10/+20
| | | | | | | - now it accumulates the data and caches them db by db, ie one has to select a db before using its structure for completion and navigator - next step is to avoid querying info_schema as much as possible - it will only query the structure if something was changed - next steps follows as soon as possible
* Bunch of improvements to the server process list viewer, including:stuconnolly2010-03-251-1/+1
| | | | | | | | | | - It is now a separate window like the console to enable monitoring. - It now uses the same window style as the console. - The ability to show or hide the process ID, column. This could possibly be enabled for some of the other columns as well, suggestions? - The ability to enable or disable the use of SHOW FULL PROCESSLIST or just SHOW PROCESSLIST. This implements most of the enhancements requested in issue #607, with the exception of the option to enable auto-refresh, which is still being worked on.
* Add support for selecting the triggers view as the default in the general ↵stuconnolly2010-03-251-12/+20
| | | | preferences pane.
* • changed behaviour of ^⌥⌘F "Filter Table" or "Change Focus to Table ↵Bibiko2010-03-251-2/+8
| | | | | | | | List" - if > 20 tables are listed it sets the focus on the search field - if <= 20 it sets the focus on the table list, and - if no selection - it selects the first table item - this fixes i597
* • NavigatorBibiko2010-03-251-11/+1
| | | | | | - make usage of a notification sent by the [MCPConnection queryDbStructure] to update the navigator, and this decouples a doc window and MCPConnection from the navigator - minimized the tree update - now connectionID-based - any tree update will be now performed on main thread and waits until done to avoid 'overlapping' updates triggered by different notifications which normally ended up in an inchoate tree display
* - Make [MCPConnection getLastErrorMessage] more consistent by always ↵rowanbeentje2010-03-251-15/+15
| | | | | | | 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
* General tidy up, with a focus on consolidating more constants in ↵stuconnolly2010-03-241-17/+18
| | | | SPConstants.h/m.