Merge branch 'master' of https://github.com/Kijin-Seija/dt-sql-parser-semantic-analyse-plugin
This commit is contained in:
		
							
								
								
									
										10
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								README.md
									
									
									
									
									
								
							@ -73,20 +73,22 @@ select_target_alias: [
 | 
			
		||||
 | 
			
		||||
## Alias
 | 
			
		||||
 | 
			
		||||
Some node names in dt-sql-parser code are different from its antlr4's definition.
 | 
			
		||||
 | 
			
		||||
You can find possible alias in https://github.com/DTStack/dt-sql-parser/blob/main/src/grammar/postgresql/PostgreSqlParser.g4, then add it into `alias` option.
 | 
			
		||||
Some node names in dt-sql-parser code are different from their antlr4's definition.
 | 
			
		||||
 | 
			
		||||
Example:
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
You can find possible alias in https://github.com/DTStack/dt-sql-parser/blob/main/src/grammar/postgresql/PostgreSqlParser.g4, then add it into `alias` option.
 | 
			
		||||
 | 
			
		||||
## Add a preprocessor
 | 
			
		||||
 | 
			
		||||
```typescript
 | 
			
		||||
const myPlugin = new DtSqlParserSemAnalysePlugin({
 | 
			
		||||
  preprocessor: [
 | 
			
		||||
    (sql) => sql.toUpperCase()
 | 
			
		||||
    (sql) => sql.toUpperCase(),
 | 
			
		||||
    ...
 | 
			
		||||
  ]
 | 
			
		||||
})
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user