aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPSQLParser.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPSQLParser.h')
-rw-r--r--Source/SPSQLParser.h27
1 files changed, 9 insertions, 18 deletions
diff --git a/Source/SPSQLParser.h b/Source/SPSQLParser.h
index af60645a..022e17bb 100644
--- a/Source/SPSQLParser.h
+++ b/Source/SPSQLParser.h
@@ -64,6 +64,10 @@
unichar *stringCharCache;
long charCacheStart;
long charCacheEnd;
+ NSString *delimiter;
+ int delimiterLength;
+ BOOL charIsDelimiter;
+ BOOL isDelimiterCommand;
}
@@ -74,6 +78,7 @@ typedef enum _SPCommentTypes {
} SPCommentType;
+
/*
* Removes comments within the current string, trimming "#", "--[/s]", and "/* * /" style strings.
*/
@@ -212,25 +217,16 @@ typedef enum _SPCommentTypes {
*/
- (NSArray *) splitStringByCharacter:(unichar)character skippingBrackets:(BOOL)skipBrackets ignoringQuotedStrings:(BOOL)ignoreQuotedStrings;
-/*
- * As splitStringByCharacter: ..., but allows control over quoting
- * - it recognises CREATE ... BEGIN ... END statements
- * - it can detect a SINGLE SQL statement in between
- * delimiter foo ... foo delimiter ;
- * ['delimiter ;' MUST be given!]
- * - it returns an array of ranges (as NSString "{loc, length}").
- * FromPosition: is needed if a subrange is passed to sync the ranges
- * according to the CQ textView ones.
- */
-- (NSArray *) splitStringIntoRangesOfSQLQueries;
-- (NSArray *) splitStringIntoRangesOfSQLQueriesFromPosition:(long)position;
+- (NSArray *) splitSqlStringByCharacter:(unichar)character;
+- (NSArray *) splitSqlStringIntoRangesByCharacter:(unichar)character;
/*
* Methods used internally by this class to power the methods above:
*/
- (long) firstOccurrenceOfCharacter:(unichar)character ignoringQuotedStrings:(BOOL)ignoreQuotedStrings;
- (long) firstOccurrenceOfCharacter:(unichar)character afterIndex:(long)startIndex ignoringQuotedStrings:(BOOL)ignoreQuotedStrings;
-- (long) firstOccurrenceOfCharacter:(unichar)character afterIndex:(long)startIndex skippingBrackets:(BOOL)skipBrackets ignoringQuotedStrings:(BOOL)ignoreQuotedStrings ;
+- (long) firstOccurrenceOfCharacter:(unichar)character afterIndex:(long)startIndex skippingBrackets:(BOOL)skipBrackets ignoringQuotedStrings:(BOOL)ignoreQuotedStrings;
+- (long) firstOccurrenceInSqlOfCharacter:(unichar)character afterIndex:(long)startIndex skippingBrackets:(BOOL)skipBrackets ignoringQuotedStrings:(BOOL)ignoreQuotedStrings;
- (long) endIndexOfStringQuotedByCharacter:(unichar)quoteCharacter startingAtIndex:(long)index;
- (long) endIndexOfCommentOfType:(SPCommentType)commentType startingAtIndex:(long)index;
@@ -242,11 +238,6 @@ typedef enum _SPCommentTypes {
- (void) deleteCharactersInRange:(NSRange)aRange;
- (void) insertString:(NSString *)aString atIndex:(NSUInteger)anIndex;
-/*
- * return an array of queries
- */
-- (NSArray *) parseQueries;
-
/* Required and primitive methods to allow subclassing class cluster */
#pragma mark -
- (id) init;