aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CustomQuery.m
Commit message (Collapse)AuthorAgeFilesLines
* • added $SP_ASLIST_ALL_FIELDS_FROM_SELECTED_TABLE as pre-defined snippet listBibiko2010-03-091-0/+15
| | | | | • added Show Completion List submenu to the Custom Query Editor gear menu with the items all dbs ^1, all tables ^2, all fields ^3 • if dbStructure is available show these pre-defined completion lists with all info like the completion it does, otherwise fall back to plain style
* - Move history popup construction to the main thread, fixing crashes ↵rowanbeentje2010-03-081-2/+11
| | | | probably caused by non-thread-safe menu interaction. This addresses http://log.sequelpro.com/view/19
* - Add a check for valid columns - this addresses ↵rowanbeentje2010-03-071-0/+1
| | | | http://log.sequelpro.com/view/25
* • added to CustomQuery's CMTextView the option to set auto-completion ↵Bibiko2010-03-071-3/+3
| | | | | | on/off, settable in Prefs and gear menu - if inserted completion is marked as function it inserts snippet (${}1:) so far; function parameters as snippets follows soon
* • fixed threading issue if user performs query in Custom Query all the ↵Bibiko2010-02-181-8/+2
| | | | | | | time by holding down ⌘R for a long time caused by updating the history - removed unnecessary updating of the historyButton - updating of all docs is now performedOnMainThread:waitUntilDone:NO
* - Implement result view saving in a more general way within CustomQuery; ↵rowanbeentje2010-02-111-19/+89
| | | | now when editing custom query results *and* sorting custom query results, scroll position and selection index are preserved
* (no commit message)Bibiko2010-02-051-5/+7
|
* • fixed synchronisation of history lists if more than one instance of the ↵Bibiko2010-02-051-32/+16
| | | | | | same SPF file is open - simplified code a bit
* • forgotten to remove debug logsBibiko2010-02-051-2/+0
|
* • refactored the entire history logic in Custom QueryBibiko2010-02-051-31/+74
| | | | | | - queries which are longer than then 64 chars are truncated in title and queries which are longer than then 256 chars are truncated in tooltip to avoid processing time to load very long queries from history; this also decreases the memory usage - added "Insert Next/Previous History Query" logic bound to ^↑ and ^↓ - fixed tiny GUI spacing problem in Custom Query
* - Rework SPSQLParser, extending DELIMITER support into all the original ↵rowanbeentje2010-02-051-4/+8
| | | | | | | | | | | 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)
* • fixed undo behaviour of insertion of history/query favsBibiko2010-02-041-3/+6
| | | | • improved text macro/query favs insertion logic
* • added key-shortcut ⌘= to make the textview size largerBibiko2010-02-021-20/+0
| | | | | | | | • ⌘-, ⌘+, ⌘= changes the font size temporarily (Mac app conform) • added key-shortcut ⌘0 to reset the font to pref default • fixed search field background for Tables List • fixed NSUInteger for completion parsing; interrupt completion if parsed string length is larger than 100000 since it doesn't make sense and leads to warnings
* • Content Table and Query Editor table's tooltip are displayed by using ↵Bibiko2010-01-311-1/+8
| | | | | | the same font/size as the table cells • CMTextView: make sure that some methods are never called if the CMTextView is set to 'not ediable'
* • CMTextView's colours are set via observer, live changed in editable ↵Bibiko2010-01-301-29/+15
| | | | | | | | textviews • added Preference setting "Table font" in "Table" pane to set the table font/size for all result tables (Content, Custom Query) • added to SPTableView the method setFont: • fixed the initialisation of vars in CMTextView (fixes the displaying of create syntax)
* Rework CMCopyTable copy functionality and related code:rowanbeentje2010-01-301-1/+1
| | | | | | | | | | - 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
* • suppress the display of table cell tooltips if TableDocument isWorking ↵Bibiko2010-01-301-1/+1
| | | | to avoid unstable tooltip status
* • added observer for all Query Editor colors to avoid initialising colors ↵Bibiko2010-01-301-0/+10
| | | | | | each time for syntax highlighting which speed it up a bit; now if one changes a color the changes are done in view after a delay of 0.1 s if text buffer < 100k for speed reasons • fixed: before highlighting the current query ensure that the text storage is in a stable and clean status; otherwise SP crashes for ranges which aren't rendered yet
* • current query highlighting is done now in drawRect: (much more faster ↵Bibiko2010-01-301-43/+14
| | | | | | | | and thanks to Jakob) • improved snippet background drawings esp. for multiple lines (commit on behalf of Jakob) • simplified code for changing and setting background colors and Pref setting for highlight current query by observers (much more faster)
* • text macro logicBibiko2010-01-291-3/+4
| | | | | | | - improved highlighting of multi-line snippets (many thanks to jabakobob for this patch!) - some tiny cosmetics • error message highlighting in Custom Query Editor - removed near message length checking to be larger than 2, not necessary
* • further tiny improvements to avoid exceptional cases while highlighting ↵Bibiko2010-01-291-4/+17
| | | | | | | | | the erroneous query - added check for near message length - make an intersection with the buffer range before selecting • text macro - each selection of a snippet breaks the undo buffer - note: undo behaviour while text macro session is active needs to be solved ⇢ work in progress
* • fixed some issues and improved the text macro behaviourBibiko2010-01-291-1/+8
|
* • for [CMTextView selectLineNumber:…] added safety-check for lineNumber < 1Bibiko2010-01-281-7/+12
| | | | | | | | • error message highlighting in CustomQuery - check for error ID 1064 before trying to select the erroneous line given as '… at line x' (this solves the issue that other error messages could end by a number) - improved regexp to get rid of localized error messages for parsing the erroneous line number (thanks to Jakob) - look the last number in a string - improved regexp to parse for the 'near message' for localized error messages
* • improved the graphical representation of text macro snippetsBibiko2010-01-271-1/+1
|
* • corrected regex to trigger table/db reload after executing a query in ↵Bibiko2010-01-261-2/+3
| | | | the Query Editor
* • added possibility to add a query favorite by user-definable alphanumeric ↵Bibiko2010-01-241-3/+21
| | | | | | | | | tab trigger; eg if tab trigger is set to "sel" sel⇥ will insert the first query which has the defined the tab trigger • preparations to insert programmable query favorites - eg "SELECT ${*} FROM ${Table}" -- after insertion "SELECT * FROM Table" the '*' is highlighted to change, press ⇥ to select the next snippet 'Table'; ⇧⇥ selects the previous snippet; the snippet selection follows the user input - Note: not yet active
* • bound Custom Query gear menu item "Completion List" (CTRL key is ↵Bibiko2010-01-221-1/+4
| | | | | | | recognized) • use regexp to get a list of current words and reduced that method to invoked if the text buffer is less than 60KB to speed up the completion (it's more likely that the user wants to complete a sql related term) • some code cosmetics
* • avoid updating TablesList for queries in Custom Query Editor à la "SHOW ↵Bibiko2010-01-211-1/+1
| | | | CREATE …"
* Address Issue #546 (format string bugs):rowanbeentje2010-01-201-5/+6
| | | | | | - 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
* Add a new SPDataStorage class, and use it in TableContent and CustomQuery:rowanbeentje2010-01-171-33/+31
| | | | | | | | - 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)
* 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-68/+68
| | | | | | | release builds, including a large number of 64bit compatibility upgrades and tweaks - Upgrade RegexKitLite to 3.3
* Menu item label.stuconnolly2010-01-061-1/+1
|
* • next step to improve the Query Favorites/History search field behaviourBibiko2010-01-051-1/+20
| | | | | - ↑ or ↓ selects now immediately the next/prev menu item [many thanks to Rowan!]
* • first trial to improve the search field behaviour for Query Favorites ↵Bibiko2010-01-051-0/+16
| | | | | | | | and Query History popup menus - the keys ↑ or ↓ inside an activated search field abort the current text field editor to allow to navigate through the result menu items by using the keyboard - up to now one has to press ↑ or ↓ twice to select - still work in progress
* • fixed maximal number of history items settingBibiko2010-01-051-2/+2
|
* • added Save/Copy History List to "Query History"'s popup menuBibiko2010-01-051-16/+137
| | | | | | | | • moved "Clear History" from gear menu to "Query History"'s popup menu and added a confirmation sheet to it • "Clear History" now distinguishes between Untitled and SPF doc - if Untitled: clear global history list stored in the Prefs - if SPF doc: clear the document-based history list only
* • replaced the (10.4) deprecated [NSTableView ↵Bibiko2010-01-041-2/+2
| | | | | | 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-9/+23
| | | | | | | | | | 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
* - Ensure all results for server variable requests are returned as strings, ↵rowanbeentje2010-01-031-0/+1
| | | | | | | 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
* - Improve line selection for certain errors ending in numbers, and ↵rowanbeentje2009-12-291-1/+1
| | | | safety-check selections to prevent crashes. This should address Issue #511.
* - Replace /* */ notation in long comments with unicode look-alikes to fix ↵rowanbeentje2009-12-281-3/+3
| | | | warnings and improve source readability
* Random source tidy up changes.stuconnolly2009-12-181-10/+2
|
* - Work through static analysis of the source, fixing a number of small ↵rowanbeentje2009-12-141-5/+3
| | | | memory leaks and fixing a couple of over-releases
* Replace the main toolbar's #define'd identifier constants with extern's. ↵stuconnolly2009-12-121-2/+2
| | | | This completes the conversion of all constants in SPConstants to extern's.
* - Additional error checking when reading in query favorites to ensure a ↵rowanbeentje2009-12-071-0/+1
| | | | | | | malformed favorite does not break application launch - Move favorites update routine to a later revision check to upgrade any query favorites created by dual use of 0.9.6 and nightlies
* • fixed URL of MySQL web search for versions < = 4.1Bibiko2009-12-051-1/+6
|
* • fixed issue for "Update Help while typing" to suppress opening the MySQL ↵Bibiko2009-12-031-15/+34
| | | | documentation periodically if no internal help can be found
* - When working with the storage arrays for CustomQuery and TableContent, ↵rowanbeentje2009-11-281-16/+56
| | | | use thread locking to ensure data safety while the table is loading. This should fix intermittent loading and reload issues, including part of #463 and should address Issue #482
* Fix an occasional crasher by checking the size of the custom query result ↵stuconnolly2009-11-241-36/+36
| | | | set is not zero before attempting to get an object from it. As far as I'm aware this crash only seemed to occur when executing the second out of 2 queries that both contained multiple OUTER JOINS.