Package com.databricks.jdbc.api.impl.converters

## Class IntervalConverter

- java.lang.Object
- - com.databricks.jdbc.api.impl.converters.IntervalConverter

    public class IntervalConverter
    extends Object

Converts a java.time.Period or java.time.Duration into the exact ANSI‐style interval literals that Databricks prints.

### Nested Class Summary

Nested Classes
`static class` `IntervalConverter.Field` The supported fields in the SQL syntax.

### Constructor Summary

Constructors
`IntervalConverter​(String arrowMetadata)`

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `toLiteral​(Object obj)` Turn a Period (YEAR/MONTH intervals) or Duration (DAY–TIME intervals) into exactly the string Databricks will print.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### IntervalConverter

    public IntervalConverter​(String arrowMetadata)

Parameters:
  `arrowMetadata` - e.g. "INTERVAL YEAR TO MONTH" or "INTERVAL HOUR TO SECOND"

### Method Detail

#### toLiteral

    public String toLiteral​(Object obj)

Turn a Period (YEAR/MONTH intervals) or Duration (DAY–TIME intervals) into exactly the string Databricks will print.