Skip to content

Commit

Permalink
Update sql-parser.en.md (apache#19295)
Browse files Browse the repository at this point in the history
  • Loading branch information
Swastyy authored Jul 17, 2022
1 parent 04cbfa2 commit 0489bda
Showing 1 changed file with 27 additions and 23 deletions.
50 changes: 27 additions & 23 deletions docs/document/content/dev-manual/sql-parser.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,39 @@ weight = 5
chapter = true
+++

## SPI Interface
## DatabaseTypedSQLParserFacade

### DatabaseTypedSQLParserFacade
### Fully-qualified class name

| *SPI Name* | *Description* |
| ---------------------------- | ----------------------------------- |
| DatabaseTypedSQLParserFacade | Configure the lexical and syntactic parser entry for SQL parsing |
[`org.apache.shardingsphere.sql.parser.spi.DatabaseTypedSQLParserFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-spi/src/main/java/org/apache/shardingsphere/sql/parser/spi/DatabaseTypedSQLParserFacade.java)

### SQLVisitorFacade
### Definition

| *SPI Name* | *Description* |
| ----------------------------------- | ------------------------------------------ |
| SQLVisitorFacade | SQL syntax tree access portal |
Database typed SQL parser facade service definition

## Sample
### Implementation classes

### DatabaseTypedSQLParserFacade
| *Configuration Type* | *Description* | *Fully-qualified class name* |
| -------------------- | ----------------------------------------- | ---------------------------- |
| MySQL | SQL parser entry based on MySQL | [`org.apache.shardingsphere.sql.parser.mysql.parser.MySQLParserFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/parser/MySQLParserFacade.java) |
| PostgreSQL | SQL parser entry based on PostgreSQL| [`org.apache.shardingsphere.sql.parser.postgresql.parser.PostgreSQLParserFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/parser/PostgreSQLParserFacade.java) |
| SQLServer | SQL parser entry based on SQLServer | [`org.apache.shardingsphere.sql.parser.sqlserver.parser.SQLServerParserFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/java/org/apache/shardingsphere/sql/parser/sqlserver/parser/SQLServerParserFacade.java) |
| Oracle | SQL parser entry based on Oracle| [`org.apache.shardingsphere.sql.parser.oracle.parser.OracleParserFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/parser/OracleParserFacade.java) |
| SQL92 | SQL parser entry based on SQL92 | [`org.apache.shardingsphere.sql.parser.sql92.parser.SQL92ParserFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sql92/src/main/java/org/apache/shardingsphere/sql/parser/sql92/parser/SQL92ParserFacade.java) |
| openGauss | SQL parser entry based on openGauss | [`org.apache.shardingsphere.sql.parser.opengauss.parser.OpenGaussParserFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-opengauss/src/main/java/org/apache/shardingsphere/sql/parser/opengauss/parser/OpenGaussParserFacade.java) |

| *Implementation Class* | *Description* |
| ---------------------- |--------------------------|
| MySQLParserFacade | SQL parser entry based on MySQL |
| PostgreSQLParserFacade | SQL parser entry based on PostgreSQL|
| SQLServerParserFacade | SQL parser entry based on SQLServer |
| OracleParserFacade | SQL parser entry based on Oracle|
| SQL92ParserFacade | SQL parser entry based on SQL92 |
| OpenGaussParserFacade | SQL parser entry based on openGauss |
## SQLVisitorFacade

### SQLVisitorFacade
### Fully-qualified class name

| *SPI Name* | *Description* |
| ----------------------------------- | ------------------------------------------ |
| SQLVisitorFacade | SQL syntax tree access portal |
[`org.apache.shardingsphere.sql.parser.spi.SQLVisitorFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-spi/src/main/java/org/apache/shardingsphere/sql/parser/spi/SQLVisitorFacade.java)

### Definition

SQL visitor facade class definition

### Implementation classes

| *Configuration Type* | *Description* | *Fully-qualified class name* |
| -------------------- | ----------------------------------------- | ---------------------------- |
| String.join(".", getDatabaseType(), getVisitorType()) | SQL syntax tree access portal | [`org.apache.shardingsphere.sql.parser.spi.SQLVisitorFacade`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-spi/src/main/java/org/apache/shardingsphere/sql/parser/spi/SQLVisitorFacade.java) |

0 comments on commit 0489bda

Please sign in to comment.