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

public Class PostgreSQLTruncFunction

extends TruncFunction
Class Inheritance
Imports
java.util.ArrayList, .List, org.hibernate.query.ReturnableType, org.hibernate.query.spi.QueryEngine, org.hibernate.query.sqm.function.SelfRenderingSqmFunction, org.hibernate.query.sqm.tree.SqmTypedNode, org.hibernate.query.sqm.tree.expression.SqmExtractUnit, org.hibernate.type.spi.TypeConfiguration

Custom TruncFunction for PostgreSQL which uses the dialect-specific function for numeric truncation
Author
Marco Belladelli

Field Summary

Modifier and TypeField and Description
private final PostgreSQLTruncRoundFunction
postgreSQLTruncRoundFunction

Deprecated as a consequence of PostgreSQLTruncRoundFunction being deprecated.
Inherited from org.hibernate.dialect.function.TruncFunction:
datetimeRenderingSupportnumericRenderingSupport

Constructor Summary

AccessConstructor and Description
public
PostgreSQLTruncFunction(boolean supportsTwoArguments, TypeConfiguration typeConfiguration)

Method Summary

Modifier and TypeMethod and Description
protected <T> SelfRenderingSqmFunction<T>
generateSqmFunctionExpression(List<? extends SqmTypedNode<?>>
the arguments of the function invocation
arguments
,
ReturnableType<T>
the function return type as inferred from its usage
impliedResultType
,
QueryEngine queryEngine)

Overrides org.hibernate.dialect.function.TruncFunction.generateSqmFunctionExpression.

Return an SQM node or subtree representing an invocation of this function with the given arguments.

Field Detail

postgreSQLTruncRoundFunctionback to summary
private final PostgreSQLTruncRoundFunction postgreSQLTruncRoundFunction

Deprecated

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

Constructor Detail

PostgreSQLTruncFunctionback to summary
public PostgreSQLTruncFunction(boolean supportsTwoArguments, TypeConfiguration typeConfiguration)

Method Detail

generateSqmFunctionExpressionback to summary
protected <T> SelfRenderingSqmFunction<T> generateSqmFunctionExpression(List<? extends SqmTypedNode<?>> arguments, ReturnableType<T> impliedResultType, QueryEngine queryEngine)

Overrides org.hibernate.dialect.function.TruncFunction.generateSqmFunctionExpression.

Doc from org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor.generateSqmFunctionExpression.

Return an SQM node or subtree representing an invocation of this function with the given arguments. This method may be overridden in the case of function descriptors that wish to customize creation of the node.

Parameters
arguments:List<? extends SqmTypedNode<?>>

the arguments of the function invocation

impliedResultType:ReturnableType<T>

the function return type as inferred from its usage

Annotations
@Override