Package org.hibernate.dialect.function
Class DB2SubstringFunction
- java.lang.Object
-
- org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor
-
- org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor
-
- org.hibernate.dialect.function.DB2SubstringFunction
-
- All Implemented Interfaces:
FunctionRenderer
,FunctionRenderingSupport
,SqmFunctionDescriptor
public class DB2SubstringFunction extends AbstractSqmSelfRenderingFunctionDescriptor
DB2's substring() function requires a code unit and substr() can't optionally take it, so we render substr() by default. If the code unit is passed, we render substring().
-
-
Constructor Summary
Constructors Constructor Description DB2SubstringFunction(TypeConfiguration typeConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getSignature(String name)
Used only for pretty-printing the function signature in the log.void
render(SqlAppender sqlAppender, List<? extends SqlAstNode> arguments, ReturnableType<?> returnType, SqlAstTranslator<?> walker)
-
Methods inherited from class org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor
generateSqmAggregateFunctionExpression, generateSqmFunctionExpression, generateSqmOrderedSetAggregateFunctionExpression, generateSqmWindowFunctionExpression, getFunctionKind
-
Methods inherited from class org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor
generateAggregateSqmExpression, generateOrderedSetAggregateSqmExpression, generateSqmExpression, generateWindowSqmExpression, getArgumentListSignature, getArgumentsValidator, getArgumentTypeResolver, getName, getReturnSignature, getReturnTypeResolver
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.query.sqm.function.FunctionRenderer
render, render, render, render
-
Methods inherited from interface org.hibernate.query.sqm.function.FunctionRenderingSupport
render, render, render
-
Methods inherited from interface org.hibernate.query.sqm.function.SqmFunctionDescriptor
alwaysIncludesParentheses, generateSqmExpression, generateSqmExpression
-
-
-
-
Constructor Detail
-
DB2SubstringFunction
public DB2SubstringFunction(TypeConfiguration typeConfiguration)
-
-
Method Detail
-
render
public void render(SqlAppender sqlAppender, List<? extends SqlAstNode> arguments, ReturnableType<?> returnType, SqlAstTranslator<?> walker)
- Specified by:
render
in interfaceFunctionRenderer
- Specified by:
render
in interfaceFunctionRenderingSupport
- Overrides:
render
in classAbstractSqmSelfRenderingFunctionDescriptor
-
getSignature
public String getSignature(String name)
Description copied from interface:SqmFunctionDescriptor
Used only for pretty-printing the function signature in the log.- Specified by:
getSignature
in interfaceSqmFunctionDescriptor
- Overrides:
getSignature
in classAbstractSqmFunctionDescriptor
- Parameters:
name
- the function name- Returns:
- the signature of the function
-
-