aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableContent.m
Commit message (Collapse)AuthorAgeFilesLines
* - 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
* • added: by holding ⌘, ⇧, or/and ⌥ dragged selected rows will be ↵Bibiko2009-06-191-2/+10
| | | | copied as SQL INSERTS (up to now only in table content browser)
* • added to SPArrayAdditions.h: NSArrayObjectAtIndex() inline functionBibiko2009-06-181-21/+21
| | | | | | | | | - 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
* Move the QuickLook interface to its own header file.stuconnolly2009-06-151-0/+1
|
* • subclassed the editSheet textViewBibiko2009-06-151-22/+0
| | | | | - added drag&drop feature of file content or path resp. - added feature to in/decrease font size via ⌘+/- or two-finger zoom gesture
* • different log message for changing max_allowed_packet for increasing it ↵Bibiko2009-06-151-5/+17
| | | | | | | | and for resetting it (a bit more transparent info) - now also check the delegate if queryGaveError: method is implemented • while adding/updating a row to the db Table Content's pane now indicates that process better via spinning wheel • after TRUNCATE TABLE reload that table content
* • deleted the drag&drop feature of file path or content from ↵Bibiko2009-06-151-4/+9
| | | | | | | | | | | SPTextViewAdditions - that feature should be added by subclassing NSTextView • fixed focus setting of editSheet • fixed general issue if SP tries to execute a query which is longer than max_allowed_packet - now it reconnects after changing max_allowed_packet (if it's editable) - the user will be informed via a log entry about that change - the new max_allowed_packet size will be valid during the current session; after reconnection to that db the default size will be used
* • improved event handling while showing QuickLook preview in editSheetBibiko2009-06-151-6/+39
| | | | | | - this also fixes the issue to play sound files properly • QuickLook's temp file will be deleted after closing the editSheet to allow double-click at the QuickLook preview for opening it in the default app • fixed some issues of loading data into the editSheet (data/string recognition)
* • moved code for de/increasing font and drag&drop feature (content or ↵Bibiko2009-06-131-45/+64
| | | | | | | | | | | | | | while holding ⌘ path) to SPTextViewAddition - two finger zooming gesture is disabled for NSTableView cells - i.e. all NSTextViews including NSTableView cells inherit these feature • simplified QuickLookFormat IBActions - added bin/text storing type to each action • QuickLook animation set to SP's window middle point • fixed issue that while having an image in editSheet an attribute change (font/size) in the editTextView destroyed the image data • fix to allow again drag&drop an image to editSheet • hide text/image/hex segment controll and QuickLook pull down button if user chose multipleLineEditingButton for non-blob fields • disabled NSLog of print result in TableDocument
* • cleaned and commented the rewritten editSheet codeBibiko2009-06-121-29/+71
| | | | - TODO: if a row contains large blob data addRowToDb: “sometimes” doesn't get rid of the correct encoding; e.g. inserted into a varchar field a ü; changed the table; went back to the table; the ü is still there; after closing and reopen the connection the ü is shown as two latin1 char.
* • rewrote editSheet for editing and displaying BLOB or TEXT data completelyBibiko2009-06-121-19/+190
| | | | • added the possibility to QuickLook the current data by choosing a data format
* • fixed exception if content table view wants to load data from a table ↵Bibiko2009-06-111-1/+1
| | | | | | but the table data are not accessible (e.g. for information_schema) - this fix sets the content table view into a defined state as well
* • cleaned code for the case that the user selects a view which causes a ↵Bibiko2009-06-101-2/+3
| | | | | | | | | MySQL error while retrieving data - [SPTableData tableEncoding] returns nil if no encoding can be found - [TableList tableViewSelectionDidChange:] checks in beforehand for a valid table encoding; this avoids to get the same MySQL error message twice and cleaned the structure view • if a MySQL error occurred while retrieving table data for the content view set the content view to a defined and clean status • bound TableContent's filterButton to DBView.xib to disable it if an error occurred (otherwise the status bar shows unexplainable results )
* • added: "Copy as SQL INSERT" ^⌥⌘CBibiko2009-06-081-3/+3
| | | | | | - 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-1/+2
| | | | • 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-1/+3
| | | | item is set to 'not hidden' in the MainMenu)
* Fixed some memory leaks found using llvm/clang. There are still some to fixbamse162009-06-051-2/+1
|
* • added the operator LIKE to numeric fields in the content browserBibiko2009-06-041-2/+7
| | | | - this fixes issue 270
* New preference to allow the displaying of vertical grid lines in table views.stuconnolly2009-05-191-19/+39
|
* More header updates for source files, including Subversion Id property.stuconnolly2009-05-191-0/+2
|
* Improve warning dialogs when removing table rows. Part of issue #192.stuconnolly2009-05-111-24/+36
|
* - When adding a new row, insert the pref-set value for NULL if the default ↵rowanbeentje2009-04-141-1/+1
| | | | value is NULL (fixes Issue #229)
* Added printing support via WebKit WebViewbamse162009-04-111-0/+22
|
* - part 4 of merge from 'avenjamin' branch into trunk.avenjamin2009-04-101-52/+52
| | | | - committing Source
* Fix for issue #211: Table content count incorrectly reporting selected row ↵stuconnolly2009-04-071-8/+16
| | | | count.
* • FIXED: "Limit from" NSStepper retains the old value if the new value ↵Bibiko2009-04-061-1/+27
| | | | | | | would be greater than the total number of rows of the current table • FIXED: if the user enters into "Limit from" a number which is greater than the total number of rows of the current table, show the last pref's "limitRowsValue" number of rows instead • FIXED: if the user has already filtered the current table by specifying "Limit from" > 1 and afterwards the user applied a new filter the filtering will be repeated for LIMIT 0, "limitRowsValue" if nothing was found
* Fixed bug when using the IN filter. removed inclusion of single quotes at ↵avenjamin2009-03-271-1/+1
| | | | start and end
* - Fix exceptions and so saving table column width changes in databases or ↵rowanbeentje2009-03-271-6/+2
| | | | tables which have already seen a column resized in the past. Looks like r389 incorrectly used arrays instead of dictionaries when cleaning up a memory leak.
* Completely redesigned query console that now uses a table view instead of a ↵stuconnolly2009-03-261-2/+5
| | | | | | | | | | | | | text view. This should significantly improve import speed, but most importantly resolves the crashes caused by the drawing that was being performed by the text view. Fixes issue #87 and implements #167. New console provides the following: - Live filtering - Ability to hide message time stamps - Ability to hide SELECT/SHOW statement messages - Ability to copy messages to pasteboard, including multiple messages - Ability to save the current filtered content to a file, with the option to include the message time stamps
* - when loading texts/blobs is disabled, the table view now shows "(not ↵jakob2009-03-261-8/+64
| | | | | | loaded)" in a gray color rather than " - text or blob -" -the remove and duplicate buttons in table and browse view are now disabled when nothing is selected
* Fix a reproducible sort-sort-refresh-sort crash bug by explicitly managing ↵rowanbeentje2009-03-251-3/+7
| | | | sortField and not referencing possibly deallocated column identifiers directly
* - fixed issue #203 (backticks in identifiers not supported)jakob2009-03-241-35/+37
| | | | | | | | - added a backtickQuotedString: method to SPStringAdditions - created the file SPArrayAdditions for a componentsJoinedAndBacktickQuoted: method In the future, we should use backtickQuotedString: to quote identifiers like this: [NSString stringWithFormat:@"SELECT * FROM %@", [tableName backtickQuotedString]]
* Issue 201: Duplicating a row resets values of text/blob fields in the new rowbamse162009-03-231-4/+4
| | | | | Changes after code review: renamed variable, replaced @"NULL" with [prefs objectForKey:@"nullValue"]
* Issue 201: Duplicating a row resets values of text/blob fields in the new rowbamse162009-03-231-4/+14
| | | | | | | | | | Fixed - If you attempt to duplicate a row in tables where blob/text data is present but hidden and there are no keys, SP correctly pops up the dialog but then continues execution, and so crashes. Fixed - If the row being duplicated contains NULL data, exceptions triggered by [NSNull length] are thrown, and SP stops responding. Thanks to Rowan for code review
* Issue #201 Duplicating a row resets values of text/blob fields in the new rowbamse162009-03-221-48/+46
|
* As Rowan's suggestion, I've replaced older/younger with after/beforebamse162009-03-191-1/+1
| | | | | | #198 Older-Younger swapped meaning