aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CustomQuery.h
Commit message (Collapse)AuthorAgeFilesLines
* • fixed: suppress highlighting of the current query if something is selectedBibiko2009-06-041-0/+1
| | | | • added: "Select Active Query ^Y" context menu item to the Custom Query Editor
* • simplified quertAtPosition:Bibiko2009-06-041-1/+1
| | | | | | • added queryRangeAtPosition: method because this is needed also for other purposes • moved the commands for highlighting the current query from queryAtPosition: to textViewDidChangedSelection: (where it belongs to) • some minor changes in error highlighting code
* • added support for the “delimiter” commandBibiko2009-06-041-0/+2
| | | | | | | | | | | | | | - added (NSArray *) splitSqlStringByCharacter:(unichar)character; (NSArray *) splitSqlStringIntoRangesByCharacter:(unichar)character; (long) firstOccurrenceInSqlOfCharacter: to the SQLParser which recognize a “delimiter” command • queryAtPosition now works with ranges to speed it up - the current query ranges resp. the just activated query range are cached in order to avoid parsing if the user only navigates through the textView buffer, or if the user calls Run Prev/Current Query only • the "import dump" function makes usage of that new “delimiter” support - i.e. dumps with procs/funcs declaration could be imported IMPORTANT: Please check the new SQLParser exhaustively in order to prove that new approach
* More header updates for source files, including Subversion Id property.stuconnolly2009-05-191-1/+2
|
* • added "MySQL Help" to the MainMenu > Help submenuBibiko2009-04-301-0/+4
| | | | | | - it shows the MySQL Help TOC of the front most tableDocument mysql connection, i.e. each tableDocument has its own Help window (due to the fact that the Help is version specific), and makes it the keyWindow - changed the way for getting the mySQLversion into the CustomQuery; now a new tableDocument set it via [customQueryInstance setMySQLversion:foo]; the other way was to unsafe regarding to get the version if MySQL Help was invoked via MainMenu • Help window and Create Table Syntax window will be released while closing the tableDocument
* • changed context menu item in CQ's textview to support "MySQL Help"Bibiko2009-04-301-0/+1
| | | | | • prepared code to work with autoHelp • improved getRangeForCurrentWord (fix for " |a")
* • MySQL HelpBibiko2009-04-301-1/+1
| | | | | | - updated autoHelp, now it recognizes cursor movement via mouse • if the chunk in CQ's textview is too large remove all attributes • some minor code cosmetics
* • MySQL HelpBibiko2009-04-301-3/+4
| | | | | - refactored and cleaned contextMenuItems for the webview - help-html-template will be loaded only once
* • MySQL Help refactoringBibiko2009-04-291-3/+5
|
* • MySQL HelpBibiko2009-04-291-7/+7
| | | | | - change help target buttons into a NSSegmentedControl - fixed minor typo
* • MySQL Help improved:Bibiko2009-04-281-1/+2
| | | | | | | - added history: go back/forward - window now has auto save name MYSQL_HELP_WINDOW - disabled contextual menu for safety reasons (temporarily) - some minor stuff
* • MySQL Help improvedBibiko2009-04-271-3/+17
| | | | | | | | | - added help target (online, in current page, in MySQL help ⌥⌘O,P,M) - GUI support for go back/forward (not yet implemented) - ⌘G, ⇧⌘G for find next/prev in current page - ⌘F selects search field; ⌘+ and ⌘- support - online search is version sensitive
* • MySQL Help improvedBibiko2009-04-271-0/+11
| | | | | | - better HTML view, list topics for multi-matching keywords - for test cases invoke it by CTRL+H in the Custom Query textView - GUI is really tentative!
* • added a prototype to support an Help view for the current word in the ↵Bibiko2009-04-241-0/+5
| | | | | | Custom Query text view - work in progress!
* • CHANGED: if an error occurs in a series of queries the user will be ↵Bibiko2009-04-221-0/+4
| | | | | | | | | | | | | | | asked to "Stop", "Continue" or "Run All" - Stop: the execution will stop at the erroneous query (if other queries would follow "Execution stopped!" will be prompted in the error message field) - Continue: continues the execution but shows that alert for a next error - Run All: runs all following queries regardless of possible errors • improved the error selection - fixed the issue for Run Current/Previous (even for duplicates) - if no error line is given it selects the first query which caused an error entirely - due to the localization of mysql error messages changed the regexps for catching the: -- line number to /([0-9]+)$/ because the line number always should be outputted at the end -- "near message" to / '(.*?)' / (important the last space because after that space the line number will be outputted) -- further checks are needed
* - Add support for "Run previous" in the custom query text field; this ↵rowanbeentje2009-04-211-1/+1
| | | | behaviour for the "Run current"/"Run selection" button is triggered if the text caret is only separated by whitespace from the last query, to allow easy running of a just-typed query
* • added selectLineNumber:x to CMTextView to be able to select the line xBibiko2009-04-201-0/+1
| | | | | | | | | • added error highlighting of the first mentioned error - if a "near message" error is provided select that message otherwise select the entire error line and scrolls to it - if no "at line x" and no "near message" is given do nothing - if a selection was given and the user pressed "runAll" destroy the selection before error checking; if no error was found reconstruct that selection (to be able to distinguish between "runSelection" and "runAll" plus selection) * changed slightly the trigger for syntax highlighting/auto-uppercasing for better scrollToRange behaviour
* Added printing support via WebKit WebViewbamse162009-04-111-0/+3
|
* - Fix an invalid reference to a missing pulldown_arrow image causing ↵rowanbeentje2009-04-051-0/+1
| | | | | | | | invalid log entries - Set the focus to the custom query text field when appropriate when switching to the custom query tab - Add the ability to set the custom query editor font, save and load it from preferences, and no longer reset the font on queries
* - Add the ability for CMTextView to automatically capitalise SQL keywords ↵rowanbeentje2009-04-031-0/+1
| | | | in the text view, currently off by default but saved from preferences. Thanks again to Hans-Jörg Bibiko for this patch; see Issue #218.
* - Implemented "Clear History" in new Gear menuavenjamin2009-04-021-0/+1
| | | | - Changed UI in Query Tab for favourite and history popups as well as Run query buttons
* - Add a new "gear" action menu underneath the custom query view, including ↵rowanbeentje2009-04-021-0/+7
| | | | | | | | | | | | a number of items: - Add menu commands for "Run All" and "Run Selected", with additional keyboard shortcuts - cmd-R for Run all, addressing #137 - Add menu commands for indenting text, outdenting text, and to show autocompletion is available - Add menu commands to toggle autopairing and autoindenting - Also hidden menu commands for history navigation and clearing, not hooked in yet (see #207) - Add a new method to our string additions: lineRangesForRange - Add "shift right" (indent) and "shift left" (outdent) support to CMTextView, including for multiple lines
* - Add autopairing support to CMTextView - many thanks to Hans-Jörg Bibiko ↵rowanbeentje2009-04-011-1/+2
| | | | | | | | for the original patch (see http://code.google.com/p/sequel-pro/issues/detail?id=208 for full details). Applied with slight amendments. - Further changes to make CMTextView more standalone and reusable - autopairing and autoindenting can now be enabled/disabled and checked. - Autopairing and autoindenting moved to app preferences.
* SPSQLParser changes:rowanbeentje2009-03-191-1/+8
| | | | | | | | | | | | | | | | | | - Use method caches for oft-called functions, and support caching of chunks of the underlying string for string walking, resulting in an overall 1.3x-1.4x parsing speedup. - Improve handling of multi-character comment starts (eg / or -) at the very end of strings - When running splitString... methods return even empty strings for consistency. - Update TableDump and TableData to match new usage SPStringAddition changes: - Add a formatter for time intervals. CMMCPConnection changes: - Add support for timing queries CustomQuery and nib changes: - Change the "Run Queries" button to "Run All". - Add a "Run Current" button, which runs the query the text caret is currently positioned inside; if text is actually selected, this changes to "Run Selection". This addresses Issue #43. - Amend the "rows affected" string to better reflect the actual number of rows altered by several queries, show the query count if > 1, and display the overall execution time of the queries. This addresses Issue #142. - No longer execute blank strings as part of the custom query, preventing errors.
* - Re-design the custom query favourties editor and get rid of the nasty ↵stuconnolly2009-03-021-37/+8
| | | | | | | plus/minus buttons. Also add some interface element validation. - Tidy up CustomQuery.h by getting rid of the definition of all datasource and delegate method signatures which don't need to be declared.
* Visible improvements in this build:rowanbeentje2009-02-181-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Significantly reduce the queries that have to be performed, improving lag - especially over slow connections (Issue #118; see new controller info under headline code changes). - Fix Issue #117 properly (export numeric quoting - we now have access to column types and so can quote appropriately). - Fix Issue #145 (loss of unsigned/null/default attributes when reordering columns). - Fixes Issue #90 (support for filtering DECIMAL column types) - Improve table scrolling speed when the table contains long items. (Added a NSFormatter to automatically truncate strings > 150 chars for display purposes only) - Improved SQL compatibility - for example /* C style comments */ are now correctly ignored in imports and custom queries. - Add text and symbols emphasising that the table info pane / status view row count is an approximation (partially addresses Issue #141) - Fixes a major memory leak whenever opening or scrolling tables containing text/blob data. - SQL import is now faster (SQL parsing part is 3x faster). - Speed up SQL export (1.5x faster for numeric data; 1.1x faster for string data) and slightly speed up CSV export (~1.1x faster). - Display sizes on the status view using the byte size formatter, as per table info pane. Headline code changes: - Add a new NSMutableString subclass, SPSQLParser. See the header file for documentation and overview, but in short it's a centralised place for SQL parsing. Centralises and improves parsing, improves comment support, improves quoting support. Despite the improved featureset this is also faster than the previous distributed implementations - for example, when used to replace the old splitQueries:, > 3x speedup. - Implement a new controller which handles a structure and status cache for the current table, and provides structure parsing for specified tables. This cache is now used throughout the code, reducing the queries that have to be performed and providing additional information about the table structure for use; I think it also improves column type format slightly. - The table info pane and the status view now draw all their data from the cache. Tweaks: - Table encoding is now detected directly instead of being derived from the collation - increased accuracy and cope with the DEFAULT encoding. - Comments and formatting cleaned up in bits I was working on, obviously. - A couple of methods - particularly [tablesListInstance table] and [tableDocument encoding] - have been renamed to avoid conflicts and fix code warnings. Future improvements now possible: - As we now have access to column types and other information, we can provide per-type behaviour where desired. - The table parsing doesn't currently pull out comments or table indices, together with one or two other attributes. Some of this would be useful for display; some, such as indices, could be used to draw the table structure view as long as we're happy discarding a couple of columns (ie cardinality!)
* MERGED r262:266 from branches/stuart02 to trunk to include new project ↵stuconnolly2008-12-101-0/+105
structure.