From 641eeff363a2864456a985b246576bfd5d41b144 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Tue, 19 May 2009 19:53:26 +0000 Subject: =?UTF-8?q?=E2=80=A2=20implemented=20a=20new=20approach=20to=20spl?= =?UTF-8?q?it=20a=20string=20into=20single=20SQL=20statements=20by=20using?= =?UTF-8?q?=20the=20lexer=20SPTokenizer=20-=20the=20new=20method=20is=20ca?= =?UTF-8?q?lled=20splitStringIntoRangesOfSQLQueries:=20in=20SPSQLParser=20?= =?UTF-8?q?-=20in=20CustomQuery's=20method=20queryAtPosition:=20can=20be?= =?UTF-8?q?=20found=20a=20test=20case=20which=20is=20as=20default=20not=20?= =?UTF-8?q?activated=20-=20must=20be=20improved=20further?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/CustomQuery.m | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Source/CustomQuery.m') diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m index 76c767d7..27f72b04 100644 --- a/Source/CustomQuery.m +++ b/Source/CustomQuery.m @@ -780,6 +780,16 @@ sets the tableView columns corresponding to the mysql-result // Split the current text into queries customQueryParser = [[SPSQLParser alloc] initWithString:[textView string]]; queries = [[NSArray alloc] initWithArray:[customQueryParser splitStringByCharacter:';']]; + + // ========= test case for SQL splitting into ranges == START + // NSArray *qs; int qc; + // qs = [[NSArray alloc] initWithArray:[customQueryParser splitStringIntoRangesOfSQLQueries]]; + // NSLog(@"---START---"); + // for(qc=0;qc<[qs count];qc++) { + // NSLog(@"%d:", qc); + // NSLog(@"%@", [[textView string] substringWithRange:NSRangeFromString([qs objectAtIndex:qc])]); + // } + // ========= test case for SQL splitting into ranges == END [customQueryParser release]; // Walk along the array of queries to identify the current query - taking into account -- cgit v1.2.3