Class SqlServerDialect
java.lang.Object
io.github.torand.fastersql.dialect.SqlServerDialect
- All Implemented Interfaces:
Dialect
Defines the Microsoft SQL Server SQL dialect.
Row offset clause is supported from SQL Server 2012 onwards Row limit clause is supported from SQL Server 2012 onwards SQL Server has the ROW_NUMBER() function but must be combined with OVER() in this context.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionformatCeilFunction(String operand) Returns the 'ceil' function formatted for a specific SQL dialect.formatConcatFunction(List<String> operands) Returns the 'concat' function formatted for a specific SQL dialect.Returns the 'current_date' system function formatted for a specific SQL dialect.formatLengthFunction(String operand) Returns the 'length' function formatted for a specific SQL dialect.formatLnFunction(String operand) Returns the 'ln' function formatted for a specific SQL dialect.formatModuloFunction(String divisor, String dividend) Returns the 'mod' function formatted for a specific SQL dialect.formatRoundFunction(String operand) Returns the 'round' function formatted for a specific SQL dialect.formatToCharFunction(String operand, String format) Returns the 'to_char' 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.Returns the string concatenation operator 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.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, formatPowerFunction, formatRowLimitClause, formatRowNumLiteral, formatRowOffsetClause, formatSetOperator, formatSubstringFunction, offsetBeforeLimit
-
Constructor Details
-
SqlServerDialect
public SqlServerDialect()Creates a Microsoft SQL ServerDialectimplementation.
-
-
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.
-
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.
-
formatToCharFunction
Description copied from interface:DialectReturns the 'to_char' function formatted for a specific SQL dialect.- Specified by:
formatToCharFunctionin interfaceDialect- Parameters:
operand- the expression to be evaluated as a stringformat- the vendor-specific format mask- Returns:
- the 'to_char' 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.
-
formatLengthFunction
Description copied from interface:DialectReturns the 'length' function formatted for a specific SQL dialect.- Specified by:
formatLengthFunctionin interfaceDialect- Parameters:
operand- the string expression to get length of- Returns:
- the 'length' function for a specific SQL dialect.
-
formatCeilFunction
Description copied from interface:DialectReturns the 'ceil' function formatted for a specific SQL dialect.- Specified by:
formatCeilFunctionin interfaceDialect- Parameters:
operand- the numeric expression to get ceiling of- Returns:
- the 'ceil' function for a specific SQL dialect.
-
formatLnFunction
Description copied from interface:DialectReturns the 'ln' function formatted for a specific SQL dialect.- Specified by:
formatLnFunctionin interfaceDialect- Parameters:
operand- the numeric expression to get natural logarithm of- Returns:
- the 'ln' function for a specific SQL dialect.
-
formatRoundFunction
Description copied from interface:DialectReturns the 'round' function formatted for a specific SQL dialect.- Specified by:
formatRoundFunctionin interfaceDialect- Parameters:
operand- the numeric expression to perform rounding on- Returns:
- the 'round' function for a specific SQL dialect.
-
formatModuloFunction
Description copied from interface:DialectReturns the 'mod' function formatted for a specific SQL dialect.- Specified by:
formatModuloFunctionin interfaceDialect- Parameters:
divisor- the numeric expression for divisor operanddividend- the numeric expression for dividend operand- Returns:
- the 'mod' function for a specific SQL dialect.
-
formatCurrentDateFunction
Description copied from interface:DialectReturns the 'current_date' system function formatted for a specific SQL dialect.- Specified by:
formatCurrentDateFunctionin interfaceDialect- Returns:
- the 'current_date' 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.
-
getConcatOperator
Description copied from interface:DialectReturns the string concatenation operator for a specific SQL Dialect.- Specified by:
getConcatOperatorin interfaceDialect- Returns:
- the string concatenation operator for a specific SQL Dialect.
-
supports
Description copied from interface:DialectIndicates whether a capability is supported by a specific SQL dialect.
-