The public members of the TCustomGSqlParser class are listed here.
Event |
Description |
This event was fired after parse sql text to source token list. | |
Fired when a bind variable(:bindvarname ) is found during parsing sql text. | |
Fired if a field was found during parsing sql. | |
This is OnGetRawSqlStatement, a member of class TCustomGSqlParser. | |
Fired when a source token was consumed by the parser, it happened when execute parse, prettyprint functions. | |
This event was used internally in order to recover syntax errors, please don't use it. | |
Fired when a variable was found. | |
Fired when a substitution varaible was found. | |
Fired when a source token that represent a table(or table alias) was found. Select t1.f1 from t1 t1 in from clause is a main table, while t1 in t1.f1 is a reference table. sender : TObject; If a main table is found, sender is type of TLzTable that represent a table object. and if a reference table is found, sender is type of TLz_Attr which represents a qualified name that including table name. pToken : TSourceToken; This is the source token that represent table name. DBObjType is value of ttObjTable or ttObjTableAlias. psqlstatement: TCustomSqlStatement This is the sql statement... more |
Method |
Description |
Check whether all solid tokens (including comment) are iterated by iterate function. | |
Check syntax of input sql, this function is used in old version. Please use parse function instead. | |
Create an instance of sql parser. | |
Fetch each sql statement in input sql into SqlStatements represents by classes descends from TCustomSqlStatement. But all these statements was not parsed, only SqlStatementType, SourceTokenList is ready for use. If you need a well prepared statement, please use Parse instead. If you need to beautify sql only, please use PrettyPrint. | |
Event handle for OnParserTokenError used for internal purposes. | |
Check syntax of input sql, and collect database objects in sql. All sql statements will be available in SqlStatements property represented by classes descend from TCustomSqlStatement even if there are syntax errors in input sql. Return value <> 0 indicates that there are syntax errors in sql. You can check error information with ErrorCount, ErrorMessages and SyntaxErrors property. | |
Same as Parse function, for compatible of old version. | |
Beautify input sql. Formatted sql text is saved in FormattedSqlText, or save to file directly if FormattedSqlfilename is specified. | |
Convert input sql text into source tokens. All these tokens are stored in SourceTokenList. | |
This function is used internally to check is beautified sql is the same as original. |
Property |
Description |
SQL dialect this parser supported. It's assigned when create a sql parser. | |
Delimiter character that used to separate sql statements. | |
Total errors found if there are syntax errors after parsing sql. Detailed error information were stored in SyntaxErrors. You can also get description of error from ErrorMessages. | |
| |
If FormattedSqlfilename is not empty, then formatted sql will be saved to this file. You can still fetch formatted sql text from FormattedSqlText. | |
Beautified sql text. | |
Quick check is there any spPpDifferenceText error occurs. | |
Quick check is there any spPpError error occurs. | |
Quick check is there any spPpException error occurs. | |
Process oracle substitution variable( &subvar) if it is set to true, and you must assign an event handler to OnSubstitutionVar to process substitution. | |
Treat ? as an identifier if it is set to true. default value is true. | |
This property controls whether free SQL object or not after pretty print the SQL. if this property is set to false, sql objects will be freed after pretty print the SQL immediately, in other words, SQL object will not be available in SqlStatements. Performance will be improved when pretty print the large SQL if KeepSqlWhenPp is set to false. The default value is set to true. This property doesn't effect when you call the parse function, SQL objects will always be saved to the SqlStatements property for further processing. | |
Lexer that convert input sql text to source tokens that will be consumed by parser. | |
Yacc parser used to generate parse tree. | |
A list of source tokens generated from input sql text. It is the input of yacc parser. All kinds of input such as whitespace, comments are all included in this source token list. | |
If this property is specified, read input sql from this file instead of SqlText. | |
List of sql statement object after parsing sql. All sql statement classes are descended from TCustomSqlStatement. | |
Input sql text. | |
All errors found after parsing sql. | |
XML output includes structure of parse tree nodes for input sql. |
Gudu software http://www.sqlparser.com
|
Send comments about this topic.
|