Package org.apache.calcite.sql.parser
Interface SqlParser.Config
- Enclosing class:
SqlParser
@Immutable
public static interface SqlParser.Config
Interface to define the configuration for a SQL parser.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
Deprecated.default boolean
default Set<CharLiteralStyle>
Returns which character literal styles are supported.default SqlConformance
default int
default SqlParserImplFactory
default org.apache.calcite.avatica.util.Casing
default org.apache.calcite.avatica.util.Quoting
quoting()
Deprecated.This property is deprecated, and has no effect.default org.apache.calcite.avatica.util.Casing
withCaseSensitive
(boolean caseSensitive) SetscaseSensitive()
.withCharLiteralStyles
(Iterable<CharLiteralStyle> charLiteralStyles) SetscharLiteralStyles()
.withConformance
(SqlConformance conformance) Setsconformance()
.withIdentifierMaxLength
(int identifierMaxLength) SetsidentifierMaxLength()
.default SqlParser.Config
withParserFactory
(SqlParserImplFactory factory) SetsparserFactory()
.withQuotedCasing
(org.apache.calcite.avatica.util.Casing casing) SetsquotedCasing()
.withQuoting
(org.apache.calcite.avatica.util.Quoting quoting) Setsquoting()
.withTimeUnitCodes
(Map<String, ? extends org.apache.calcite.avatica.util.TimeUnit> timeUnitCodes) SetstimeUnitCodes()
.withUnquotedCasing
(org.apache.calcite.avatica.util.Casing casing) SetsunquotedCasing()
.
-
Field Details
-
DEFAULT
Default configuration.
-
-
Method Details
-
identifierMaxLength
@Default default int identifierMaxLength() -
withIdentifierMaxLength
SetsidentifierMaxLength()
. -
quotedCasing
@Default default org.apache.calcite.avatica.util.Casing quotedCasing() -
withQuotedCasing
SetsquotedCasing()
. -
unquotedCasing
@Default default org.apache.calcite.avatica.util.Casing unquotedCasing() -
withUnquotedCasing
SetsunquotedCasing()
. -
quoting
@Default default org.apache.calcite.avatica.util.Quoting quoting() -
withQuoting
Setsquoting()
. -
caseSensitive
@Default default boolean caseSensitive() -
withCaseSensitive
SetscaseSensitive()
. -
conformance
-
withConformance
Setsconformance()
. -
allowBangEqual
Deprecated. -
charLiteralStyles
Returns which character literal styles are supported. -
withCharLiteralStyles
SetscharLiteralStyles()
. -
timeUnitCodes
Deprecated.This property is deprecated, and has no effect. All non-standard time units are now parsed as identifiers, and resolved in the validator. You can define custom time frames usingRelDataTypeSystem.deriveTimeFrameSet(TimeFrameSet)
. To alias a time frame, useTimeFrameSet.Builder.addAlias(String, String)
.Returns a mapping from abbreviations to time units.For example, if the map contains the entry ("Y",
TimeUnit.YEAR
) then you can write "EXTRACT(S FROM orderDate)
". -
withTimeUnitCodes
SqlParser.Config withTimeUnitCodes(Map<String, ? extends org.apache.calcite.avatica.util.TimeUnit> timeUnitCodes) SetstimeUnitCodes()
. -
parserFactory
-
withParserFactory
SetsparserFactory()
. -
withLex
-