Top Description Fields Constructors Methods
org.hibernate.dialect.function

public Class TimestampaddFunction

extends AbstractSqmSelfRenderingFunctionDescriptor
Class Inheritance
Known Direct Subclasses
org.hibernate.dialect.function.IntegralTimestampaddFunction
Imports
jakarta.persistence.TemporalType, org.hibernate.dialect.Dialect, org.hibernate.query.ReturnableType, org.hibernate.query.sqm.IntervalType, .TemporalUnit, org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor, .SelfRenderingFunctionSqlAstExpression, org.hibernate.query.sqm.produce.function.ArgumentTypesValidator, .StandardArgumentsValidators, .StandardFunctionArgumentTypeResolvers, .StandardFunctionReturnTypeResolvers, org.hibernate.query.sqm.produce.function.internal.PatternRenderer, org.hibernate.sql.ast.SqlAstTranslator, org.hibernate.sql.ast.spi.SqlAppender, org.hibernate.sql.ast.tree.SqlAstNode, org.hibernate.sql.ast.tree.expression.DurationUnit, .Expression, org.hibernate.type.spi.TypeConfiguration, java.util.List

Deprecated

as a consequence of AbstractSqmSelfRenderingFunctionDescriptor being deprecated. See corresponding docs for further information.

The timestampadd() or dateadd() function has a funny syntax which accepts a TemporalUnit as the first argument, and the actual set of accepted units varies widely. This class uses Dialect#timestampaddPattern(TemporalUnit, TemporalType, IntervalType) to abstract these differences.
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private final Dialect

Constructor Summary

AccessConstructor and Description
public
TimestampaddFunction(Dialect dialect, TypeConfiguration typeConfiguration)

Method Summary

Modifier and TypeMethod and Description
public SelfRenderingFunctionSqlAstExpression
expression(ReturnableType<?> impliedResultType, SqlAstNode... sqlAstArguments)

public String
pack-priv PatternRenderer
public void
Inherited from org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor:
generateSqmAggregateFunctionExpressiongenerateSqmFunctionExpressiongenerateSqmOrderedSetAggregateFunctionExpressiongenerateSqmWindowFunctionExpressiongetFunctionKind

Field Detail

dialectback to summary
private final Dialect dialect

Constructor Detail

TimestampaddFunctionback to summary
public TimestampaddFunction(Dialect dialect, TypeConfiguration typeConfiguration)

Method Detail

expressionback to summary
public SelfRenderingFunctionSqlAstExpression expression(ReturnableType<?> impliedResultType, SqlAstNode... sqlAstArguments)
getArgumentListSignatureback to summary
public String getArgumentListSignature()

Overrides org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor.getArgumentListSignature.

Annotations
@Override
patternRendererback to summary
pack-priv PatternRenderer patternRenderer(TemporalUnit unit, Expression interval, Expression to)
renderback to summary
public void render(SqlAppender sqlAppender, List<? extends SqlAstNode> arguments, ReturnableType<?> returnType, SqlAstTranslator<?> walker)

Overrides org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor.render.

Implements org.hibernate.query.sqm.function.FunctionRenderer.render.

Annotations
@Override