aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableData.m
Commit message (Collapse)AuthorAgeFilesLines
* - Fix "Multiple selection" still being displayed after multiple tables are ↵rowanbeentje2011-06-141-1/+1
| | | | | | | | | deleted - If multiple tables are selected when opening the SPFieldMapperController select the first to import into - Clean up tableName in tablesList - now returns nil if no tables are selected or multiple tables are selected, instead of returning an empty string for multiple tables
* initial commit of SP_REFACTOR ifdefs, the start of a long quest to separate ↵sqlprodev2011-04-111-0/+13
| | | | UI code from functional code
* Fix more compiler warnings, including a few bugsrowanbeentje2011-03-081-9/+9
|
* Fix compiler warnings.stuconnolly2011-03-011-0/+2
|
* - Fix spinlocks when table/database deletion causes the table information ↵rowanbeentje2011-02-191-0/+9
| | | | class to trigger a requery of current state information. This addresses Issue #985.
* - Revert r3187, which only masked an underlying bug and caused double ↵rowanbeentje2011-02-111-57/+53
| | | | | | | | | columns in views - In SPTableStructureDelete, don't request the encoding if the table is reloading; this prevents multithreaded data fetches and race conditions causing Issue #974. - Alter SPTableData to use thread mutexes instead of a boolean to prevent threading issues, which also fixes Issue #974 in a different way. Alter race condition checks to block their threads instead of returning bogus information to prevent state issues. - Alter table loading to no longer load trigger information until required, speeding up use of other views and cleaning up the console log.
* - Improve handling of table names containing backslashesrowanbeentje2010-12-141-0/+2
|
* • improved Structure editing logic to allow to choose auto_increment for ↵Bibiko2010-11-011-0/+8
| | | | | | Extra only if table has no auto_increment field set since MySQL allows only one auto column - the user has still the chance to type 'auto_increment' into the Extra manually
* - Split out all of SPExportController's delegate methods to their own category.stuconnolly2010-10-241-2/+0
| | | | | | | | - Prepare for the implementation of PDF and HTML export by hiding the export options box for export types that don't need it. - Fix some spacing issues on the export dialog. - Create a new SPCategoryAdditions header that is included in the apps precompiled header, making all additions available to all classes. - Update strings files.
* Considering nearly every class uses constants, import it via the prefix header.stuconnolly2010-10-191-1/+0
|
* Various improvements to server capability/version checking, including:stuconnolly2010-10-071-7/+5
| | | | | | | | | | | | | - Add a new ServerSupport class, for which an instance is created upon each new connection and is then subsequently accessible via SPDatabaseDocument. - Replace the majority of manual version checking with calls to properties in the above new class. - Improve the user manager's compatibility with MySQL 3 and 4 servers. Fixes issue #811 Other changes include: - Disable the encoding popup button when adding a new table or database to servers running pre MySQL 4.1 as it only contains one option, 'Default'. - Fix various potential memory leaks discovered during static analysis. - General tidy up and comments.
* • added basic support for spatial dataBibiko2010-10-011-0/+29
| | | | | | - while querying and writing back make usage of AsText() and GeomFromText() to allow to edit each GEOMETRY field as text simple string - works only in Content Tab so far - the spatial data are not yet editable inside views
* • fixed issue836 by avoiding the fact that while selecting a new table ↵Bibiko2010-09-221-88/+191
| | | | | | | | the CREATE SYNTAX will be parsed twice under certain circumstances which led to this issue - introduced a isWorking mechanism to SPTableData; while SPTableData is updating its cache (ie the CREATE SYNTAX is being parsed) each request for values will return nil or an empty array; the caller is responsible to decide what to do • various commenting stuff • various speed improvements
* • added some basic VIEW INFORMATION coming from information.schema.VIEWSBibiko2010-08-301-52/+62
|
* Encoding changes and improvements, particularly to increase compatibility ↵rowanbeentje2010-08-251-2/+61
| | | | | | | | | | | with extended characters in MySQL identifiers (names of dbs/tables/cols): - Move encoding queries and control into MCPKit, with newly cleaned-up methods, and switch a number of locations to using the new code. - Use UTF8 connections for many identifier-based queries (selecting and listing databases, tables, stored procs, table information). This fixes selection and creation of table and database names containing extended characters, also fixing exceptions and errors. - Improve UTF8 over Latin1 to correctly set the client character set encoding as well, fixing custom queries and edits; remove custom code in SPTableContent achieving the same thing in a single location. - Fix database encoding detection routines - Update localisable strings
* - Make a few more strings localizablerowanbeentje2010-08-011-1/+1
|
* A number of exporter improvements:rowanbeentje2010-06-071-1/+2
| | | | | | | | | | | | - Improve interface validation on the SQL view, including fixing no-content toggling - Fix the export of views to correctly construct placeholder tables and fix view syntax export (this addresses Issue #707) - Fix logic controlling Stored Procedure and Function export - fix hangs and allow correct export - Handle permission errors when retrieving Stored Pro/Function syntax - Improve export of linebreaks in CSV quoted cells for improved Excel compatibility - SQL export now retrieves table syntax as it progresses through the tables - more accurate progress bar and removes initial pause when exporting lots of tables - Alter filename construction to use centralised filename string: fixes end export Growl notification - Improve dump comments
* - Fix exceptions and crashes caused by corrupt tables, disabled storage ↵rowanbeentje2010-06-021-0/+6
| | | | engines, or similar hard MySQL errors
* Rename TableDocument to SPDatabaseDocument.stuconnolly2010-05-281-1/+1
|
* Rename TablesList to SPTablesList.stuconnolly2010-05-271-1/+1
|
* Initial implementation of tabs:rowanbeentje2010-05-231-3/+4
| | | | | | | | - 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
* Rework alert sheets:rowanbeentje2010-05-091-5/+5
| | | | | | | - 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
* Review trigger fetching and storage:rowanbeentje2010-05-011-30/+51
| | | | | | | - Trigger queries are no longer made for MySQL < 5.0.2 - Trigger loading has been deferred until the trigger tab is active, reducing queries when switching tables and thus increasing overall responsiveness - Export triggers in MySQL dumps even if the Table Content switch is unchecked
* fix for #642 (deleting more than 3 rows failed on MySQL before 5.0.3)jakob2010-04-221-5/+9
|
* Forgot to update Localizable.strings for previous commit.stuconnolly2010-04-111-2/+2
|
* Tidy up imports and fix 'Reverse Sort Order' when sorting connection ↵stuconnolly2010-03-311-2/+0
| | | | favorites (Thanks Hans).
* - Improve error checking for various actions, particularly permissions ↵rowanbeentje2010-03-311-4/+31
| | | | 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
* Before attempting to parse the create syntax of a table or view, check that ↵stuconnolly2010-03-261-0/+4
| | | | it's not nil. This accommodates cases where the SHOW CREATE SYNTAX query caused the connection reconnect dialog to appear and the user chose the close the connection.
* - 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
* General tidy up, with a focus on consolidating more constants in ↵stuconnolly2010-03-241-14/+13
| | | | SPConstants.h/m.
* • fixed issue for new data representation of the key @"default" in [ ↵Bibiko2010-03-231-1/+1
| | | | informationForView:] since it can be [NSNull null]
* • CSV ImportBibiko2010-03-221-8/+6
| | | | | | | | - 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)
* - Make a number of changes to attempt to improve disconnection/quit ↵rowanbeentje2010-03-161-1/+1
| | | | | | | | | 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.
* Fix some potential issues found during static analysis.stuconnolly2010-03-151-1/+1
|
* Following a manual code review, fix some local variables overriding global ↵rowanbeentje2010-03-151-12/+10
| | | | variables, a few leaks, and additional nil setting/checking to prevent overreleases or releases of random areas of memory.
* • added to method informationForTable: Bibiko2010-02-201-12/+37
| | | | | | - the root dict key "primarykeyfield" = <field name> - the key "isprimarykey" for corresponding table field - the key "unique" = 1 if corresponding table field has a UNIQUE KEY
* Fix a number of memory leaks, and over-releases, as both a result of manual ↵rowanbeentje2010-02-101-1/+3
| | | | inspection of leaks and Clang static analysis.
* Complete the implementation of the management of table triggers (accessible ↵stuconnolly2010-02-061-1/+1
| | | | via Cmd+6). Note, that better support for entering the trigger statement in terms of escaping and delimiter support most likely needs to be added.
* • fixed endless loop if user selects a table whose name contains chars ↵Bibiko2010-02-051-1/+2
| | | | | | which are not support by the current set encoding • added DataMigrationDialog.xib to Xcode project
* - Rework SPSQLParser, extending DELIMITER support into all the original ↵rowanbeentje2010-02-051-2/+2
| | | | | | | | | | | 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-0/+4
| | | | | | | 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
* • field mapping sheet is now document-modal instead of blocking SP entirelyBibiko2010-02-031-2/+2
| | | | | | | • if an error occurred while retrieving column or index data in Structure pane reset Structure pane to a stable status, display the error message, and reload Tables List table due to the fact the it's very likely that SP tries to retrieve data from a table which doesn't exist anymore • fixed spelling of "occurred" Note: NOT YET DONE: if in Structure view the actual underlying table was deleted or renamed by an other mysql event and the user tries to add/change a field do suppress this attempt safely
* Added preliminary support for triggers. You can access the tab via the bamse162010-01-311-0/+33
| | | | | | | | | | | | | | | | | | | | menu item View > Table Triggers (apple-6). Heavily copied from Relations tab, lots of functionality missing. Just lists the triggers for the table now. M Source/SPTableData.m M Source/SPConstants.h M Source/SPConstants.m A Source/SPTableTriggers.h A Source/SPTableTriggers.m M Source/TableDocument.h M Source/TableDocument.m M Source/SPTableData.h M Interfaces/English.lproj/MainMenu.xib M Interfaces/English.lproj/DBView.xib M sequel-pro.xcodeproj/project.pbxproj
* Address Issue #546 (format string bugs):rowanbeentje2010-01-201-4/+5
| | | | | | - 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
* Replace COUNT(*) with COUNT(1) which is usually faster, and much faster in ↵bamse162010-01-141-2/+2
| | | | certain conditions
* - Upgrade Sequel Pro to be compiled as a 3-way PPC/i386/x86_64 binary for ↵rowanbeentje2010-01-091-9/+9
| | | | | | | release builds, including a large number of 64bit compatibility upgrades and tweaks - Upgrade RegexKitLite to 3.3
* - Ensure all results for server variable requests are returned as strings, ↵rowanbeentje2010-01-031-15/+8
| | | | | | | 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
* - Work through static analysis of the source, fixing a number of small ↵rowanbeentje2009-12-141-2/+2
| | | | memory leaks and fixing a couple of over-releases
* Delay the releasing of the createTableSyntax variable in SPTableData until ↵stuconnolly2009-11-201-15/+14
| | | | 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.
* When attempting to delete a field that is part of a foreign key ↵stuconnolly2009-11-181-3/+11
| | | | | | | | | 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.