Class H2Dialect
java.lang.Object
io.github.torand.fastersql.dialect.H2Dialect
- All Implemented Interfaces:
Dialect
Defines the H2 SQL dialect.
-
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.formatLengthFunction(String operand) Returns the 'length' function formatted for a specific SQL dialect.formatModuloFunction(String divisor, String dividend) Returns the 'mod' function formatted for a specific SQL dialect.Returns the row limit clause formatted for a specific SQL dialect.Returns the row number literal formatted for a specific SQL dialect.Returns the row offset clause 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.booleanIndicates whether offset clause must be specified before limit clause; if supported.booleansupports(Capability capability) Indicates whether a capability is supported by a specific SQL dialect.withCustomizations(Connection connection) Adds some user defined functions emulating common SQL constructs not supported by default.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, formatCurrentDateFunction, formatLnFunction, formatPowerFunction, formatRoundFunction, formatSetOperator, formatSubstringFunction, formatToCharFunction, formatToNumberFunction, getConcatOperator
-
Constructor Details
-
H2Dialect
public H2Dialect()Creates an H2Dialectimplementation.
-
-
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.
-
offsetBeforeLimit
public boolean offsetBeforeLimit()Description copied from interface:DialectIndicates whether offset clause must be specified before limit clause; if supported.- Specified by:
offsetBeforeLimitin interfaceDialect- Returns:
- whether offset clause must be specified before limit clause; if supported.
-
formatRowOffsetClause
Description copied from interface:DialectReturns the row offset clause formatted for a specific SQL dialect.- Specified by:
formatRowOffsetClausein interfaceDialect- Returns:
- the row offset clause formatted for a specific SQL dialect.
-
formatRowLimitClause
Description copied from interface:DialectReturns the row limit clause formatted for a specific SQL dialect.- Specified by:
formatRowLimitClausein interfaceDialect- Returns:
- the row limit clause formatted for a specific SQL dialect.
-
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.
-
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.
-
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.
-
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. -
withCustomizations
Adds some user defined functions emulating common SQL constructs not supported by default.- Parameters:
connection- a live H2 connection.- Returns:
- the modified dialect.
-