Package org.hibernate.dialect.function
Class SybaseASEGenerateSeriesFunction
java.lang.Object
org.hibernate.query.sqm.function.AbstractSqmSetReturningFunctionDescriptor
org.hibernate.query.sqm.function.AbstractSqmSelfRenderingSetReturningFunctionDescriptor
org.hibernate.dialect.function.GenerateSeriesFunction
org.hibernate.dialect.function.NumberSeriesGenerateSeriesFunction
org.hibernate.dialect.function.SybaseASEGenerateSeriesFunction
- All Implemented Interfaces:
SetReturningFunctionRenderer,SqmSetReturningFunctionDescriptor
Sybase ASE generate_series function.
This implementation first replicates an XML tag with a specified maximum size with the
replicate function
and then uses xmltable to produce rows for every generated element.
References to the value are replaced with expressions of the form start + step * iterationVariable
and a condition is added either to the query or join where the function is used to ensure that the value is
less than or equal to the stop value.-
Nested Class Summary
Nested classes/interfaces inherited from class org.hibernate.dialect.function.NumberSeriesGenerateSeriesFunction
NumberSeriesGenerateSeriesFunction.NumberSeriesGenerateSeriesSetReturningFunctionTypeResolver, NumberSeriesGenerateSeriesFunction.NumberSeriesQueryTransformer -
Field Summary
Fields inherited from class org.hibernate.dialect.function.NumberSeriesGenerateSeriesFunction
maxSeriesSizeFields inherited from class org.hibernate.dialect.function.GenerateSeriesFunction
coerceToTimestamp -
Constructor Summary
ConstructorsConstructorDescriptionSybaseASEGenerateSeriesFunction(int maxSeriesSize, TypeConfiguration typeConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> SelfRenderingSqmSetReturningFunction<T> generateSqmSetReturningFunctionExpression(List<? extends SqmTypedNode<?>> arguments, QueryEngine queryEngine) Return an SQM node or subtree representing an invocation of this function with the given arguments.protected voidrenderGenerateSeries(SqlAppender sqlAppender, Expression start, Expression stop, @Nullable Expression step, AnonymousTupleTableGroupProducer tupleType, String tableIdentifierVariable, SqlAstTranslator<?> walker) booleanrendersIdentifierVariable(List<SqlAstNode> arguments, SessionFactoryImplementor sessionFactory) Methods inherited from class org.hibernate.dialect.function.NumberSeriesGenerateSeriesFunction
add, multiply, multiply, needsVariableMethods inherited from class org.hibernate.dialect.function.GenerateSeriesFunction
renderMethods inherited from class org.hibernate.query.sqm.function.AbstractSqmSetReturningFunctionDescriptor
generateSqmExpression, getArgumentListSignature, getArgumentsValidator, getArgumentTypeResolver, getName, getSetReturningTypeResolver, getSignature
-
Constructor Details
-
SybaseASEGenerateSeriesFunction
-
-
Method Details
-
rendersIdentifierVariable
public boolean rendersIdentifierVariable(List<SqlAstNode> arguments, SessionFactoryImplementor sessionFactory) -
generateSqmSetReturningFunctionExpression
protected <T> SelfRenderingSqmSetReturningFunction<T> generateSqmSetReturningFunctionExpression(List<? extends SqmTypedNode<?>> arguments, QueryEngine queryEngine) Description copied from class:AbstractSqmSetReturningFunctionDescriptorReturn 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.- Overrides:
generateSqmSetReturningFunctionExpressionin classAbstractSqmSelfRenderingSetReturningFunctionDescriptor- Parameters:
arguments- the arguments of the function invocation
-
renderGenerateSeries
protected void renderGenerateSeries(SqlAppender sqlAppender, Expression start, Expression stop, @Nullable Expression step, AnonymousTupleTableGroupProducer tupleType, String tableIdentifierVariable, SqlAstTranslator<?> walker) - Specified by:
renderGenerateSeriesin classNumberSeriesGenerateSeriesFunction
-