aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableContent.m
Commit message (Collapse)AuthorAgeFilesLines
* - Remove an NSLog I accidentally left in (and another found via a search)rowanbeentje2009-09-011-1/+0
| | | | | - Improve SQL parser streaming improvements for significant speedups and some very important bugfixes
* When editing blob/text fields and the LoadBlobsAsNeeded option is enabled, ↵stuconnolly2009-08-271-17/+17
| | | | load a blob/text's field content even if we are still editing the row. This prevents the placeholder value '(not loaded)' being displayed, giving the impression that it is the field's value. Fixes issue #385.
* - Fix NSLock console linesrowanbeentje2009-08-251-68/+68
| | | | | | | - Speed up table content processing a bit - Make the table content download/processing determinate where an approximate row count is available - Clean up table content source, assuming MCPStreamingResult will remain in use
* • further improvements to open/save spf filesBibiko2009-08-231-11/+30
| | | | | - rearrange invoking procedure for spf data if SP asks for passwords • fine-tuned and fixed table history for BETWEEN operator
* • corrected table history entries for operator BETWEEN (misunderstood ↵Bibiko2009-08-231-7/+15
| | | | logic firstly)
* • modified SPHistoryController to handle the new BETWEEN operatorBibiko2009-08-231-3/+14
| | | | • after changing the operator in TableContent set focus to first argument field
* Add support for the BETWEEN operator when filtering a table's content. ↵stuconnolly2009-08-211-54/+106
| | | | Implements issue #361. Note the sizing of the new controls still needs fine tuned.
* • first preparations to save the current connection window as SPF fileBibiko2009-08-211-0/+1
| | | | • added to TableContent's method filterSettings the dict key 'filterComparisonTag' in order to be able to rely on menu item tags instead on the title strings
* Experimental change to make table content browsing much faster:rowanbeentje2009-08-201-2/+39
| | | | | | - Use the new MCPStreamingResult in TableContent, replacing the old standard query/fetchResultAsArray. This appears to be much faster (and lower memory use) but I've left the old fetchResultAsArray in place for the time being until we see how we feel about it.
* • re-implemented tooltips for Content and Query tablesBibiko2009-08-201-30/+35
| | | | | - catch exceptions while retrieving the original table data while/before reloading/changing the table source data - 'image' is now set to autorelease
* • quick fix - disabled tooltips in Content and Query tables due to crashesBibiko2009-08-201-30/+30
|
* • SPTooltip: added type "image"Bibiko2009-08-181-12/+9
| | | | | - show images directly as a NSImage in a NSImageView (this decreases the memory usage enormously) • applied new tooltip invocation for image blob data in Content Pane and Custom Query table
* • added SPTooltips for cell content in Content TableBibiko2009-08-141-0/+41
| | | | | | | | | - text strings are display with line breaks and tabs - if cell content represents image data display that image as transparent thumbnail (by using base64 encoded HTML img tag) Notes: - SPTooltip implementation to show an image via a NSImageView will be implemented soon (the HTML way needs too much memory due to base64 encoded string) - to discuss: Should we add a preference setting to display these tooltips?
* - Rework TableContent row count fetching, loading it in the correct ↵rowanbeentje2009-08-131-34/+50
| | | | | | | | locations, and correcting the logic for fetching the count of rows so that the query is not used where not necessary. - Update the Table Info pane and tab with a new row count if one is known - this addresses Issue #141 - This reverts r1090, and so needs to be discussed with stuart02 - the rest of the row logic changes may have fixed the 'larger issue' described there?
* - Fix table content sorting, broken in r1183 - this addresses Issue #364rowanbeentje2009-08-111-1/+1
|
* Rework data loading in TableContent:rowanbeentje2009-08-111-477/+349
| | | | | | | | | - Data loading now only occurs in one place in the code. This improves consistency and fixes a number of actions which used to trigger a full table reload followed instantly by a filter when the action was performed - If "Reload data after..." prefs are unticked, no longer load the data (ie the preference now works) - Make table count text more consistent and useful - Fix a number of small position-saving type problems with filters and limits active. This fixes Issue #200. - Clean up and standardise the code dealing with data storage - only one data storage array is now used.
* • added to the FieldEditorSheet a max text length validationBibiko2009-08-101-5/+13
| | | | | | • added the max text length validation for the TableContent while editing in the FieldEditorSheet • reinvoked the validation of the max text length for TableContent editing while editing in a cell • fixed in TableContent: prevent the editing of data cells in gray if the cell displays the gray NULL value
* • added field name to Field Editor SheetBibiko2009-08-081-1/+4
| | | | | | - initial support (not yet finished) Note: maybe add information about field type, max length as attributed string
* When selecting a cell to edit that is either a blob or text field and hasn't ↵stuconnolly2009-08-081-28/+29
| | | | already had it's content loaded, only load the data for the selected cell and not the entire row. Fixes issue #288.
* (no commit message)Bibiko2009-08-041-0/+4
|
* This shouldn't actually be negated as a return value of YES indicating that ↵stuconnolly2009-08-031-1/+1
| | | | NULLs are allowed is correct and we can color it if it also matches the user's NULL placeholder.
* • add Menu Item "Insert NULL value" SHIFT+CTRL+NBibiko2009-08-031-2/+2
| | | | | | | - it inserts the value set in the preferences • a NULL value will be displayed greyed in the Custom Query result • make usage of NSArrayObjectAtIndex() in TableContent for tableView:willDisplayCell - and negated the NULL checking for column (is NULL allowed)
* When blob/text fields are loaded on demand also color them light gray if ↵stuconnolly2009-08-031-1/+1
| | | | they are actually NULL.
* Use light gray rather than gray for displaying NULLs and blog/text fields ↵stuconnolly2009-08-031-2/+2
| | | | that aren't loaded.
* Display the user specified NULL value placeholder in grey when displaying a ↵stuconnolly2009-08-031-26/+27
| | | | table's content. Fixes issue 337.#
* - Fix an errant NSLog in TableSourcerowanbeentje2009-08-011-67/+228
| | | | | | - 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
* Put the table content filter in a split view so the field name drop down and ↵stuconnolly2009-08-011-0/+18
| | | | search field can be resized. Addresses issue #339.
* Disable updating the number of rows in the selected table in the table data ↵stuconnolly2009-07-211-3/+3
| | | | cache within getNumberOfRows after the discovery of much larger issue.
* Merge framework integration branch back to trunk. Summary of changes:stuconnolly2009-07-211-17/+16
| | | | | | | | | | | | | | | - 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.
* Improvements to reporting the correct row count for tables. See issue #141.stuconnolly2009-07-211-10/+10
|
* • added: AMIndeterminateProgressIndicatorCell for global spinning wheelBibiko2009-07-181-1/+1
| | | | | • added: spinning wheel background image • removed warning in TableContent (unused 'j')
* - Update WHERE string buildup - the code now uses equals comparisons rather ↵rowanbeentje2009-07-181-22/+3
| | | | than LIKE, so the quote methods were incorrect. We now use standard escaping without additional LIKE preparation. This resolves Issue #338
* Add the ability to navigate between tables via foreign key relationships, ↵rowanbeentje2009-07-181-53/+116
| | | | | | | | | 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)
* • Field Editor Sheet classBibiko2009-07-171-1/+1
| | | | | | - added the feature to set "isEditable"; according to "isEditable" GUI elements will be hidden or renamed - if no blob data reduce the minimal sheet size since no segment or quicklook control is needed
* • applied the new class SPFieldEditorController to TableContentBibiko2009-07-171-503/+19
| | | | • deleted in DBVview.xib Field Editor Sheet (out-sourced)
* - Make the DBView window the document window. This allows the document to ↵rowanbeentje2009-07-151-22/+18
| | | | | | | | | | be closed when the window is closed, freeing the document's memory - Update a number of dealloc methods to include more retained memory, and to avoid releasing non-retained memory - Remove notification observers and delegates where appropriate to avoid issues after document closing - Fix a couple of memory leaks - Support window cascading for all windows past the first, using the first window as the autosave window
* Rework data storage and retrieval in TableContent and CustomQuery backing ↵rowanbeentje2009-07-131-97/+105
| | | | | | | | | | | | 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
* - Add support for the function "NOW()" to resolve Issue #300rowanbeentje2009-07-091-0/+3
|
* - Correctly display errors that occur when editing rows, and ensure the row ↵rowanbeentje2009-07-091-8/+5
| | | | isn't deselected to prevent accidental loss of entered data
* Fix warnings caused by calls to validateMenuItem: being passed to NSObject ↵stuconnolly2009-07-021-1/+1
| | | | by returning YES by default.
* Add contextual menus to the table content and table relations views. ↵stuconnolly2009-07-021-0/+21
| | | | Completes the implementation of issue #139 as all views now have contextual menus.
* • changes in editSheet:Bibiko2009-06-241-12/+53
| | | | | | - generate Hex representation on demand (this speeds up the working with images enormously) - added support to paste image data via the pasteboard (data are stored as TIFF LZW compressed) - if user switched to an other view (text/iamge/hex) that view will be become first responder explicity (fixes an issue that the Open button got the focus sometimes)
* • added to SPDataAdditions:Bibiko2009-06-231-26/+14
| | | | | | - (NSString *) shortStringRepresentationUsingEncoding: --mainly used for displaying large blob data in a tableView • tiny speed improvements for tableView:objectValueForTableColumn and tableView:setObjectValueForTableColumn in Content Browser and Custom Query
* • fixed several problems for alerting an error sheet inside of a ↵Bibiko2009-06-231-5/+25
| | | | didEndSelector: of an other sheet
* • added SPDataCellFormatter to data cells of the Custom Query tableBibiko2009-06-231-26/+33
| | | | | | | | • in Content Browser send only the first 255 bytes to the cell formatter (makes it a tick faster) • fixed for editing in Content Browser if row contains binary blob data: - use = instead of LIKE operator in UPDATE statement - binary data will converted into X'...' representation
* • moved dataToHex as dataToFormattedHexString from TableContent to ↵Bibiko2009-06-231-89/+3
| | | | SPDataAdditions in order to you that method in different classes
* • changed: if the current edited field is a "ENUM" fieldBibiko2009-06-211-1/+5
| | | | | - show NULL in the combobox only if NULL value is allowed for the current field - display NULL value according to prefs' setting for NULL value
* • some code cleaning and tiny performance enhancements for various ↵Bibiko2009-06-211-55/+61
| | | | for/while loops
* • added: SPDataAdditions.mBibiko2009-06-191-66/+8
| | | | | | | - base64EncodingWithLineLength: • improved printing of blobs which contain image data - not it supports PDF preview - set maximum width to 100px or less
* • added to TableContent.m:Bibiko2009-06-191-0/+117
| | | | | | | | - (NSArray * )currentDataResult -- like currentResult but returns "BLOB" for blob data and a base64 encoded string for images à la <IMG SRC="data:image/auto;base64,"> - (NSString * ) base64EncodingOfData:(NSData * )data withLineLength:(unsigned int)lineLength -- it returns a base64 encoded string of data • changed: currentDataResult is now called for printing from the Table Content Browser