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 Details

    • appendAsDate

      public static void appendAsDate(SqlAppender appender, TemporalAccessor temporalAccessor)
      Append a date from a java.time value without surrounding literal syntax.
    • appendAsDate

      public static void appendAsDate(SqlAppender appender, Date date)
      Append a date from a legacy date value without surrounding literal syntax.
    • appendAsDate

      public static void appendAsDate(SqlAppender appender, Calendar calendar)
      Append a date from a calendar without surrounding literal syntax.
    • appendAsLocalTime

      public static void appendAsLocalTime(SqlAppender appender, TemporalAccessor temporalAccessor)
      Append a local time from a java.time value without an offset.
    • appendAsLocalTime

      public static void appendAsLocalTime(SqlAppender appender, Date date)
      Append a local time from a legacy date value without an offset.
    • appendAsLocalTime

      public static void appendAsLocalTime(SqlAppender appender, Calendar calendar)
      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

      public static void appendAsTime(SqlAppender appender, Date date, TimeZone jdbcTimeZone)
      Append an offset-bearing time from a legacy date using the JDBC timezone.
    • appendAsTime

      public static void appendAsTime(SqlAppender appender, Calendar calendar, TimeZone jdbcTimeZone)
      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.