aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMCopyTable.m
Commit message (Collapse)AuthorAgeFilesLines
* Column autosizing:rowanbeentje2010-08-121-1/+5
| | | | | | - Handle "(not loaded)" placeholders; this addresses http://spbug.com/l/1420 - Fix row inspection of widely-spaced rows for large, fast-loading tables, ensuring up to maxRows rows are inspected
* Implement column autosizing for the Content View:rowanbeentje2010-08-121-0/+95
| | | | | | | | - Add automatic column sizing (for columns without saved widths) as part of the value loading process - Rework table updates to be timer based, for time-based and more regular updates. This improves speed and allows tables to update more consistently. This results in overall smoother table loads, faster table loads, and autosizing columns. This partially implements Issues #271 and #272. Column autosizing will likely be tweaked, and this will all also be extended to Custom Query views in a future patch.
* Rename CustomQuery as SPCustomQuery.stuconnolly2010-07-061-2/+2
|
* Rename TableContent to SPTableContent.stuconnolly2010-05-281-4/+4
|
* - Correctly append tabs to binary/data cells when copying as tab-separated ↵rowanbeentje2010-05-111-1/+3
| | | | rows. This addresses Issue #681
* - Ensure Copy [with Column Names]/Copy As SQL are disabled on the trigger ↵rowanbeentje2010-03-291-12/+31
| | | | and relations views. This fixes the copy parts of http://log.sequelpro.com/view/53
* Following a manual code review, fix some local variables overriding global ↵rowanbeentje2010-03-151-1/+1
| | | | variables, a few leaks, and additional nil setting/checking to prevent overreleases or releases of random areas of memory.
* - When copying (as TSV) or dragging rows, copy BLOBs and binary TEXTs as ↵rowanbeentje2010-02-031-6/+21
| | | | | | | they are shown - as strings. This addresses Issue #558. - Remove some unused variables
* - Check whether super implement awakeFromNib before calling to fix 10.5 ↵rowanbeentje2010-02-011-1/+3
| | | | compatibility
* Rework CMCopyTable copy functionality and related code:rowanbeentje2010-01-301-196/+198
| | | | | | | | | | - 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
* Add a new SPDataStorage class, and use it in TableContent and CustomQuery:rowanbeentje2010-01-171-3/+1
| | | | | | | | - 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)
* • fixed issue for "Copy as SQL INSERT" after filteringBibiko2010-01-111-1/+7
| | | | | - accessing table data from [dataSource:tableView:objectValueForTableColumn:row] directly - maybe related to issue 506
* - Upgrade Sequel Pro to be compiled as a 3-way PPC/i386/x86_64 binary for ↵rowanbeentje2010-01-091-14/+14
| | | | | | | 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-49/+43
| | | | | | tableView:writeRows:toPasteboard:] method by [NSTableView tableView:writeRowsWithIndexes:toPasteboard:] • some code cosmetics
* • remember scrollview port and selected row after editing in the Custom ↵Bibiko2010-01-041-1/+16
| | | | | | | | | | Query table view - after reloading the entire data the table view port will be restored but this leads up to now to a "tiny jitter" (maybe fixable in the near future) - the re-selection does NOT follow the actual edited row, e.g. if one changes a cell value whose column is used for sorting the actual edited row could appear somewhere • if the editing in the Custom Query table view was invoked by pressing RETURN/ENTER one can go through the columns by pressing ESC but up to now that editing will be interrupted after the user pressed OK - this behaviour is temporary and should be fixed in the near future by storing the new row data temporarily; after editing the last column AND if all columns have the same table origin the row data will be updated. To allow the row editing for columns which have different table origins could probably cause inconsistencies. - further discussion is needed
* - Work through static analysis of the source, fixing a number of small ↵rowanbeentje2009-12-141-1/+4
| | | | memory leaks and fixing a couple of over-releases
* - Improve import cancellation responsiveness, especially for lots of short ↵rowanbeentje2009-12-021-1/+0
| | | | | | | data rows or slow connections - Remove a debug NSLog on "Copy as SQL insert"
* - Fix copying SQL INSERTs for binary-type strings (regression somewhere ↵rowanbeentje2009-11-301-3/+8
| | | | since 0.9.6)
* Tidy up.stuconnolly2009-11-071-3/+0
|
* Replace the use of hard coded preference keys with constants to prevent ↵stuconnolly2009-10-171-3/+4
| | | | issues such as the one fixed in revision 1419. All future preference usage should be done so using these constants.
* • fixed three further typos for: objectForKey:@"NullValue"Bibiko2009-10-161-2/+2
| | | | • allow to enter the NULL value string even if the cell/field's maximal length is set to less then the actual NULL value string length (eg varchar(3) and NULL value string is @"NULL")
* Improve handling of NULL and "(not loaded)" placeholders:rowanbeentje2009-10-101-7/+17
| | | | | | | - Rewrite TableContent and CustomQuery to store NSNull and SPNotLoaded objects in the data arrays where appropriate, rather than providing string conversion on data load. Faster, simpler comparisons and processing code, slightly lower memory usage, and reduces the chance of bugs caused by inadvertantly processing the string values; we can now also distinguish easily between NULL and "NULL" etc, and further paves the ground for image representations of special values. - Fix a bug caused by consistent value reloading when editing BLOB/TEXT columns with deferred loading - if editing a row and revisiting an edited cell, the original value was restored; the original value is now only loaded once. This addresses the rest of Issue #423.
* • some code cleaning and removing of the deprecated method ↵Bibiko2009-09-281-49/+53
| | | | 'selectedRowEnumerator'
* - Tweak keydown handling in the content view to reenable key interaction ↵rowanbeentje2009-09-151-4/+2
| | | | (eg selection changes with the arrow keys)
* Fixed keyDown editing of SPTableView and CMCopyTablemltownsend2009-08-281-3/+3
|
* • improvement for hitting RETURN or ENTER to invoke the row edit modeBibiko2009-08-271-2/+20
| | | | | | - fixed that the table is selectable again - hitting ENTER/RETURN are enabled only for TableContent and ask the delegate's tableView:shouldEditTableColumn: method for validation (by doing so a RETURN/ENTER is the same event as a double-click into a table cell for column 0 if table is in non-editing mode)
* Fix for not editing in CMCopyTable when hitting enter or return which is ↵mltownsend2009-08-261-0/+5
| | | | used in CustomQuery
* Fix a memory leak when loading a table's content. When setting the column ↵stuconnolly2009-08-181-1/+4
| | | | definitions in CMCopyTable, the array wasn't being released on subsequent allocations.
* Merge framework integration branch back to trunk. Summary of changes:stuconnolly2009-07-211-1/+2
| | | | | | | | | | | | | | | - 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.
* Rework data storage and retrieval in TableContent and CustomQuery backing ↵rowanbeentje2009-07-131-22/+24
| | | | | | | | | | | | arrays, and make some editable CustomQuery improvements: - Switch to using arrays for row storage rather than dictionaries. Use the data column index for table column identifiers. - This fixes Issue #316 and also allows sorting by all custom query result columns using a column index rather than the name - Offers significant speed and memory advantages: result building is now 2x-3x faster, memory used for results storage is 30-40% lower, and result access is slightly faster. (Note full 2x-3x speed results won't be seen - result fetching and mysql binary work isn't included in the timing) - No longer need to fetch the first column of data for tables containing only blob types - Correctly escape strings when editing CustomQuery results - Rewrite NSArrayObjectAtIndex to use the native CFArrayGetValueAtIndex rather than cached selectors - neater code and I think slightly faster
* • fixed: make usage of backtickQuotedString to allow table names ↵Bibiko2009-06-231-8/+9
| | | | | | containing a ` • some minor code cleaning and commenting
* • first steps to synchronize CustomQuery table and ContentTableBibiko2009-06-221-2/+3
| | | | | | - CustomQuery table now allows to copy selected rows as SQL INSERT (table name is set to "<table>" - if a field is a blob display only the first 255 bytes/chars in the CQ table for speed reasons - blob fields in CQ does not listen to the pref setting for "LoadBlobsAsNeeded" because it could happen that no one-to-one relation to their original data will be found
* • added to SPArrayAdditions.h: NSArrayObjectAtIndex() inline functionBibiko2009-06-181-2/+2
| | | | | | | | | - 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
* • added: "Copy as SQL INSERT" ^⌥⌘CBibiko2009-06-081-83/+166
| | | | | | - up to now only available for the table content pane - supports blobs - if a primary key is given it also support (not yet loaded) blobs and long text data fields
* • improved "Copy as SQL INSERT" (still hidden)Bibiko2009-06-071-2/+3
| | | | • disabled "Copy with Column Names" if Custom Query editor is active
* • improved "Copy as SQL INSERT" (still hidden - can be tested if the menu ↵Bibiko2009-06-071-15/+50
| | | | item is set to 'not hidden' in the MainMenu)
* • moved macros enumerate() and sizeOf() to sequel-pro_Prefix.pchBibiko2009-06-061-20/+103
| | | | | | • added to SPArrayAdditions.m - (NSArray *)subarrayWithIndexes:(NSIndexSet *)indexes • added "Copy as SQL INSERT" to MainMenu (not yet activated) • added to CMCopyTable - (NSString *)selectedRowsAsSqlInserts for copying selectedRows as INSERT INTO ... string (under constructions, up to now it works for strings)
* Replaced check on title with check on menu tag for Copy with Column Names ↵bamse162009-05-251-2/+3
| | | | issue #233. Thanks to Ben for suggestion.
* More header updates for source files, including Subversion Id property.stuconnolly2009-05-191-0/+2
|
* Issue 233: Option to copy field headings from result panelsbamse162009-05-141-4/+18
| | | | | | Implementation of copy with column names menu item Removal of copy column names
* MERGED r262:266 from branches/stuart02 to trunk to include new project ↵stuconnolly2008-12-101-0/+183
structure.