public class StaticPrecisionFspTimestampFunction extends NoArgSQLFunction
A function that returns a StandardBasicTypes.TIMESTAMP
with static fractional seconds precision (fsp).
| Constructor and Description |
|---|
StaticPrecisionFspTimestampFunction(String name,
boolean hasParenthesesIfNoArguments)
Constructs a
StandardBasicTypes.TIMESTAMP function using the
default fractional second precision as defined by the database. |
StaticPrecisionFspTimestampFunction(String name,
int fsp)
Constructs a
StandardBasicTypes.TIMESTAMP function using
the specified fractional seconds precision. |
| Modifier and Type | Method and Description |
|---|---|
String |
render(Type argumentType,
List args,
SessionFactoryImplementor factory)
Render the function call as SQL fragment.
|
getName, getReturnType, hasArguments, hasParenthesesIfNoArgumentspublic StaticPrecisionFspTimestampFunction(String name, boolean hasParenthesesIfNoArguments)
Constructs a StandardBasicTypes.TIMESTAMP function using the
default fractional second precision as defined by the database.
name - The function namehasParenthesesIfNoArguments - Does the function call need parenthesis if there are no arguments?public StaticPrecisionFspTimestampFunction(String name, int fsp)
Constructs a StandardBasicTypes.TIMESTAMP function using
the specified fractional seconds precision.
name - The function namefsp - The explicit fractional seconds precision to renderIllegalArgumentException - if fsp < 0.public String render(Type argumentType, List args, SessionFactoryImplementor factory) throws QueryException
SQLFunctionRender the function call as SQL fragment.
<p/>
Note, the 'firstArgumentType' parameter should match the one passed into SQLFunction.getReturnType(org.hibernate.type.Type, org.hibernate.engine.spi.Mapping)
render in interface SQLFunctionrender in class NoArgSQLFunctionargumentType - The type of the first argumentargs - The function argumentsfactory - The SessionFactoryQueryException - Indicates a problem rendering the
function call.Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.