aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPSQLParser.m
Commit message (Collapse)AuthorAgeFilesLines
* • some minor speed improvementsBibiko2011-02-171-15/+18
|
* - Fix support for delimiters at the very end of a query string/filerowanbeentje2010-09-271-2/+2
|
* Improve delimiter support in imported SQL files:rowanbeentje2010-09-271-7/+13
| | | | | | - Retain the delimiter if one is found, to avoid autorelease issues. This fixes http://spbug.com/l/124 . - Improve delimiter support in a few functions, particularly SPSQLParser's trimAndReturnStringToCharacter:trimmingInclusively:returningInclusively:ignoringQuotedStrings, to improve compatibility
* - Add support for automatically converting \r and \r\n linebreaks in query ↵rowanbeentje2010-07-291-123/+280
| | | | | | | | syntax to \n. This addresses Issue #652. - Clean up SPSQLParser, and use a few more CFString methods to avoid obj-c messaging in loops - When importing SQL using autodetect, perform a manual SET NAMES if possible to cope with poorly-exported files.
* Enable all *reasonable* warnings for all build configurations and fix a few ↵stuconnolly2010-04-261-1/+1
| | | | of them.
* - Rework SPSQLParser, extending DELIMITER support into all the original ↵rowanbeentje2010-02-051-312/+172
| | | | | | | | | | | 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)
* - Upgrade Sequel Pro to be compiled as a 3-way PPC/i386/x86_64 binary for ↵rowanbeentje2010-01-091-43/+47
| | | | | | | release builds, including a large number of 64bit compatibility upgrades and tweaks - Upgrade RegexKitLite to 3.3
* - Replace /* */ notation in long comments with unicode look-alikes to fix ↵rowanbeentje2009-12-281-1/+1
| | | | warnings and improve source readability
* Tidy up.stuconnolly2009-11-071-1/+0
|
* • fixed issue: avoid executing of the last query of a set of queries in ↵Bibiko2009-10-291-3/+8
| | | | the Query Editor if the last query is empty or it is a "DELIMITER" statement to come up with the result of the last valid query or to avoid an unnecessary error message
* • fixed bug while parsing the CREATE TABLE syntax if a column name ↵Bibiko2009-10-091-0/+11
| | | | | | | | contains a '#' or '/*' - this fixes issue 431 - furthermore if the parsing process fails for some other reasons, i.e. a table name is NULL or empty SP alerts the user about it instead of stalling
* - Remove an NSLog I accidentally left in (and another found via a search)rowanbeentje2009-09-011-18/+10
| | | | | - Improve SQL parser streaming improvements for significant speedups and some very important bugfixes
* Refactor CSV/SQL import structure slightly, and rewrite SQL import:rowanbeentje2009-08-311-2/+40
| | | | | | | - SQL import now reads and processes files in full streaming mode, running queries as they are encountered - Memory usage during import is significantly reduced, and should stay within a few megabytes; the significant memory use remaining is for query logging - The progress bar more accurately represents progress and is shown at once (this addresses Issue #320)
* • added support for the “delimiter” commandBibiko2009-06-041-113/+267
| | | | | | | | | | | | | | - 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
* • implemented a new approach to split a string into single SQL statements ↵Bibiko2009-05-191-0/+82
| | | | | | | | by using the lexer SPTokenizer - the new method is called splitStringIntoRangesOfSQLQueries: in SPSQLParser - in CustomQuery's method queryAtPosition: can be found a test case which is as default not activated - must be improved further
* More header updates for source files, including Subversion Id property.stuconnolly2009-05-191-0/+2
|
* Source tidy up including standard header for all source files.stuconnolly2009-05-181-1/+2
|
* - added ability to view function and procedures and preliminary ability to ↵mtvee2009-05-131-0/+47
| | | | input same via the editor
* SPSQLParser changes:rowanbeentje2009-03-191-24/+92
| | | | | | | | | | | | | | | | | | - 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.
* Visible improvements in this build:rowanbeentje2009-02-181-0/+655
- 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!)