Class OracleDialect
java.lang.Object
io.github.torand.fastersql.dialect.OracleDialect
- All Implemented Interfaces:
Dialect
Defines the Oracle SQL dialect.
Row offset clause is supported from Oracle 12c onwards Row limit clause is supported from Oracle 12c onwards
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionformatConcatFunction(List<String> operands) Returns the 'concat' function formatted for a specific SQL dialect.Returns the row number literal formatted for a specific SQL dialect.formatSetOperator(SetOperator setOperator) Returns the specified set operator formatted for a specific SQL dialect.formatSubstringFunction(String operand, int startPos, int length) Returns the 'substring' function formatted for a specific SQL dialect.formatToNumberFunction(String operand, int precision, int scale) Returns the 'to_number' function formatted for a specific SQL dialect.getDataType(DataType dataType) Returns the data type for a specific SQL dialect.Gets the name of the RDBMS product associated with this SQL dialect.booleansupports(Capability capability) Indicates whether a capability is supported by a specific SQL dialect.Enables emulating OFFSET and LIMIT constructs for older Oracle versions.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.torand.fastersql.dialect.Dialect
formatCastFunction, formatCeilFunction, formatCurrentDateFunction, formatLengthFunction, formatLnFunction, formatModuloFunction, formatPowerFunction, formatRoundFunction, formatRowLimitClause, formatRowOffsetClause, formatToCharFunction, getConcatOperator, offsetBeforeLimit
-
Constructor Details
-
OracleDialect
public OracleDialect()Creates an OracleDialectimplementation.
-
-
Method Details
-
getProductName
Description copied from interface:DialectGets the name of the RDBMS product associated with this SQL dialect.- Specified by:
getProductNamein interfaceDialect- Returns:
- the name of the RDBMS product.
-
formatRowNumLiteral
Description copied from interface:DialectReturns the row number literal formatted for a specific SQL dialect.- Specified by:
formatRowNumLiteralin interfaceDialect- Returns:
- the row number literal formatted for a specific SQL dialect.
-
formatSetOperator
Description copied from interface:DialectReturns the specified set operator formatted for a specific SQL dialect.- Specified by:
formatSetOperatorin interfaceDialect- Parameters:
setOperator- the set operator.- Returns:
- the set operator for a specific SQL dialect.
-
formatToNumberFunction
Description copied from interface:DialectReturns the 'to_number' function formatted for a specific SQL dialect.- Specified by:
formatToNumberFunctionin interfaceDialect- Parameters:
operand- the string expression to be evaluated as a numberprecision- the precision that represents the number of significant digitsscale- the scale that that represents the number of digits after the decimal point. Must be less than or equal to the precision.- Returns:
- the 'to_number' function for a specific SQL dialect.
-
formatSubstringFunction
Description copied from interface:DialectReturns the 'substring' function formatted for a specific SQL dialect.- Specified by:
formatSubstringFunctionin interfaceDialect- Parameters:
operand- the string expression to get substring fromstartPos- the start position (1-based) of the substringlength- the length of the substring- Returns:
- the 'substring' function for a specific SQL dialect.
-
formatConcatFunction
Description copied from interface:DialectReturns the 'concat' function formatted for a specific SQL dialect.- Specified by:
formatConcatFunctionin interfaceDialect- Parameters:
operands- the string expressions to concatenate- Returns:
- the 'concat' function for a specific SQL dialect.
-
getDataType
Description copied from interface:DialectReturns the data type for a specific SQL dialect.- Specified by:
getDataTypein interfaceDialect- Parameters:
dataType- the ISO data type- Returns:
- the data type for a specific SQL dialect.
-
supports
Description copied from interface:DialectIndicates whether a capability is supported by a specific SQL dialect. -
withLegacyRowLimiting
Enables emulating OFFSET and LIMIT constructs for older Oracle versions. Row offset and limit clauses are supported from Oracle 12c onwards. Invoke this method when using previous versions of Oracle, to simulate these clauses with subqueries.- Returns:
- the modified dialect.
-