In my application I needed to distinguish if a query returns a resultset or not so I wrote a string parser to look for the first valid keyword of a text. For a while I migrated this logic to use TZTokenizer instead and now I found out that the following query:
Code: Select all
-- This is a comment
SELECT * FROM MyTabe
Code: Select all
/* This is a comment */
SELECT * FROM MyTable
Code: Select all
SetCharacterState('-', '-', CommentState);