Class StandardDateTimeLiteralRendering
java.lang.Object
org.hibernate.dialect.literal.spi.StandardDateTimeLiteralRendering
@Incubating(since="8.0")
@SPI(USE)
public final class StandardDateTimeLiteralRendering
extends Object
Appends the standard datetime body used while composing a SQL literal.
Call these operations from an implementation of
LiteralSupport.appendDateTimeLiteral(SqlAppender, TemporalAccessor, TemporalType, TimeZone) and append the database-specific
introducer, quotes, escape delimiters, cast, or other surrounding syntax
separately. Each operation appends immediately; do not retain the appender
or supplied value.
- Since:
- 8.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidappendAsDate(SqlAppender appender, TemporalAccessor temporalAccessor) Append a date from ajava.timevalue without surrounding literal syntax.static voidappendAsDate(SqlAppender appender, Calendar calendar) Append a date from a calendar without surrounding literal syntax.static voidappendAsDate(SqlAppender appender, Date date) Append a date from a legacy date value without surrounding literal syntax.static voidappendAsLocalTime(SqlAppender appender, TemporalAccessor temporalAccessor) Append a local time from ajava.timevalue without an offset.static voidappendAsLocalTime(SqlAppender appender, Calendar calendar) Append a local time from a calendar without an offset.static voidappendAsLocalTime(SqlAppender appender, Date date) Append a local time from a legacy date value without an offset.static voidappendAsTime(SqlAppender appender, TemporalAccessor temporalAccessor, boolean supportsOffset, TimeZone jdbcTimeZone) Append a time, retaining an available offset only when the database supports it.static voidappendAsTime(SqlAppender appender, TemporalAccessor temporalAccessor, boolean supportsOffset, TimeZone jdbcTimeZone, ZeroOffsetLiteralStyle zeroOffsetStyle) Append a time using the requested representation for a rendered zero offset.static voidappendAsTime(SqlAppender appender, Calendar calendar, TimeZone jdbcTimeZone) Append an offset-bearing time from a calendar using the JDBC timezone.static voidappendAsTime(SqlAppender appender, Date date, TimeZone jdbcTimeZone) Append an offset-bearing time from a legacy date using the JDBC timezone.static voidappendAsTimestampWithMicros(SqlAppender appender, TemporalAccessor temporalAccessor, boolean supportsOffset, TimeZone jdbcTimeZone) Append a timestamp with six fractional digits.static voidappendAsTimestampWithMicros(SqlAppender appender, TemporalAccessor temporalAccessor, boolean supportsOffset, TimeZone jdbcTimeZone, ZeroOffsetLiteralStyle zeroOffsetStyle) Append a timestamp with six fractional digits and the requested zero-offset representation.static voidappendAsTimestampWithMicros(SqlAppender appender, Date date, TimeZone jdbcTimeZone) Append a timestamp with microsecond precision from a legacy date value.static voidappendAsTimestampWithMillis(SqlAppender appender, TemporalAccessor temporalAccessor, boolean supportsOffset, TimeZone jdbcTimeZone) Append a timestamp with three fractional digits.static voidappendAsTimestampWithMillis(SqlAppender appender, TemporalAccessor temporalAccessor, boolean supportsOffset, TimeZone jdbcTimeZone, ZeroOffsetLiteralStyle zeroOffsetStyle) Append a timestamp with three fractional digits and the requested zero-offset representation.static voidappendAsTimestampWithMillis(SqlAppender appender, Calendar calendar, TimeZone jdbcTimeZone) Append a timestamp with millisecond precision from a calendar.static voidappendAsTimestampWithMillis(SqlAppender appender, Date date, TimeZone jdbcTimeZone) Append a timestamp with millisecond precision from a legacy date value.static voidappendAsTimestampWithNanos(SqlAppender appender, TemporalAccessor temporalAccessor, boolean supportsOffset, TimeZone jdbcTimeZone) Append a timestamp with nine fractional digits.static voidappendAsTimestampWithNanos(SqlAppender appender, TemporalAccessor temporalAccessor, boolean supportsOffset, TimeZone jdbcTimeZone, ZeroOffsetLiteralStyle zeroOffsetStyle) Append a timestamp with nine fractional digits and the requested zero-offset representation.static voidappendAsTimestampWithNanos(SqlAppender appender, Date date, TimeZone jdbcTimeZone) Append a timestamp with nanosecond precision from a legacy date value.
-
Method Details
-
appendAsDate
Append a date from ajava.timevalue without surrounding literal syntax. -
appendAsDate
Append a date from a legacy date value without surrounding literal syntax. -
appendAsDate
Append a date from a calendar without surrounding literal syntax. -
appendAsLocalTime
Append a local time from ajava.timevalue without an offset. -
appendAsLocalTime
Append a local time from a legacy date value without an offset. -
appendAsLocalTime
Append a local time from a calendar without an offset. -
appendAsTime
public static void appendAsTime(SqlAppender appender, TemporalAccessor temporalAccessor, boolean supportsOffset, TimeZone jdbcTimeZone) Append a time, retaining an available offset only when the database supports it. -
appendAsTime
public static void appendAsTime(SqlAppender appender, TemporalAccessor temporalAccessor, boolean supportsOffset, TimeZone jdbcTimeZone, ZeroOffsetLiteralStyle zeroOffsetStyle) Append a time using the requested representation for a rendered zero offset. -
appendAsTime
Append an offset-bearing time from a legacy date using the JDBC timezone. -
appendAsTime
Append an offset-bearing time from a calendar using the JDBC timezone. -
appendAsTimestampWithMillis
public static void appendAsTimestampWithMillis(SqlAppender appender, TemporalAccessor temporalAccessor, boolean supportsOffset, TimeZone jdbcTimeZone) Append a timestamp with three fractional digits. -
appendAsTimestampWithMillis
public static void appendAsTimestampWithMillis(SqlAppender appender, TemporalAccessor temporalAccessor, boolean supportsOffset, TimeZone jdbcTimeZone, ZeroOffsetLiteralStyle zeroOffsetStyle) Append a timestamp with three fractional digits and the requested zero-offset representation. -
appendAsTimestampWithMillis
public static void appendAsTimestampWithMillis(SqlAppender appender, Date date, TimeZone jdbcTimeZone) Append a timestamp with millisecond precision from a legacy date value. -
appendAsTimestampWithMillis
public static void appendAsTimestampWithMillis(SqlAppender appender, Calendar calendar, TimeZone jdbcTimeZone) Append a timestamp with millisecond precision from a calendar. -
appendAsTimestampWithMicros
public static void appendAsTimestampWithMicros(SqlAppender appender, TemporalAccessor temporalAccessor, boolean supportsOffset, TimeZone jdbcTimeZone) Append a timestamp with six fractional digits. -
appendAsTimestampWithMicros
public static void appendAsTimestampWithMicros(SqlAppender appender, TemporalAccessor temporalAccessor, boolean supportsOffset, TimeZone jdbcTimeZone, ZeroOffsetLiteralStyle zeroOffsetStyle) Append a timestamp with six fractional digits and the requested zero-offset representation. -
appendAsTimestampWithMicros
public static void appendAsTimestampWithMicros(SqlAppender appender, Date date, TimeZone jdbcTimeZone) Append a timestamp with microsecond precision from a legacy date value. -
appendAsTimestampWithNanos
public static void appendAsTimestampWithNanos(SqlAppender appender, TemporalAccessor temporalAccessor, boolean supportsOffset, TimeZone jdbcTimeZone) Append a timestamp with nine fractional digits. -
appendAsTimestampWithNanos
public static void appendAsTimestampWithNanos(SqlAppender appender, TemporalAccessor temporalAccessor, boolean supportsOffset, TimeZone jdbcTimeZone, ZeroOffsetLiteralStyle zeroOffsetStyle) Append a timestamp with nine fractional digits and the requested zero-offset representation. -
appendAsTimestampWithNanos
public static void appendAsTimestampWithNanos(SqlAppender appender, Date date, TimeZone jdbcTimeZone) Append a timestamp with nanosecond precision from a legacy date value.
-