SetParserConfig sets the parser config.
(config ParserConfig)
| 140 | |
| 141 | // SetParserConfig sets the parser config. |
| 142 | func (parser *Parser) SetParserConfig(config ParserConfig) { |
| 143 | parser.EnableWindowFunc(config.EnableWindowFunction) |
| 144 | parser.SetStrictDoubleTypeCheck(config.EnableStrictDoubleTypeCheck) |
| 145 | parser.lexer.skipPositionRecording = config.SkipPositionRecording |
| 146 | } |
| 147 | |
| 148 | // ParseSQL parses a query string to raw ast.StmtNode. |
| 149 | func (parser *Parser) ParseSQL(sql string, params ...ParseParam) (stmt []ast.StmtNode, warns []error, err error) { |