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