S - type of SQL segmentT - type of SQL nodepublic interface SQLSegmentConverter<S extends org.apache.shardingsphere.sql.parser.sql.common.segment.SQLSegment,T extends org.apache.calcite.sql.SqlNode>
| Modifier and Type | Method and Description |
|---|---|
Optional<T> |
convertToSQLNode(S segment)
Convert SQL segment to SQL node.
|
Optional<S> |
convertToSQLSegment(T sqlNode)
Convert SQL node to SQL segment.
|
default int |
getStartIndex(org.apache.calcite.sql.SqlNode sqlNode)
Get start index.
|
default int |
getStopIndex(org.apache.calcite.sql.SqlNode sqlNode)
Get stop index.
|
Optional<T> convertToSQLNode(S segment)
segment - SQL segment be to convertedOptional<S> convertToSQLSegment(T sqlNode)
sqlNode - SQL node be to converteddefault int getStartIndex(org.apache.calcite.sql.SqlNode sqlNode)
sqlNode - SQL nodedefault int getStopIndex(org.apache.calcite.sql.SqlNode sqlNode)
sqlNode - SQL nodeCopyright © 2022 The Apache Software Foundation. All rights reserved.