public final class SpannerConverters extends Object
Modifier and Type | Field and Description |
---|---|
static org.springframework.core.convert.converter.Converter<Date,com.google.cloud.Timestamp> |
DATE_TIMESTAMP_CONVERTER
A converter from
Date to the Spanner timestamp type. |
static Collection<org.springframework.core.convert.converter.Converter> |
DEFAULT_SPANNER_READ_CONVERTERS
Converters from common types to those used by Spanner.
|
static Collection<org.springframework.core.convert.converter.Converter> |
DEFAULT_SPANNER_WRITE_CONVERTERS
Converters from common types to those used by Spanner.
|
static org.springframework.core.convert.converter.Converter<Instant,com.google.cloud.Timestamp> |
INSTANT_TIMESTAMP_CONVERTER
A converter from
Instant to the Spanner instantaneous time type. |
static org.springframework.core.convert.converter.Converter<Date,com.google.cloud.Date> |
JAVA_SQL_TO_SPANNER_DATE_CONVERTER
A converter from
Date to the Spanner date type. |
static org.springframework.core.convert.converter.Converter<byte[],com.google.cloud.ByteArray> |
JAVA_TO_SPANNER_BYTE_ARRAY_CONVERTER
A converter from a byte array to the Spanner bytes type.
|
static org.springframework.core.convert.converter.Converter<Timestamp,com.google.cloud.Timestamp> |
JAVA_TO_SPANNER_TIMESTAMP_CONVERTER
A converter from
Timestamp to the Spanner instantaneous time type. |
static org.springframework.core.convert.converter.Converter<LocalDateTime,com.google.cloud.Timestamp> |
LOCAL_DATE_TIME_TIMESTAMP_CONVERTER
A converter from
LocalDateTime to the Spanner timestamp type. |
static org.springframework.core.convert.converter.Converter<LocalDate,com.google.cloud.Date> |
LOCAL_DATE_TIMESTAMP_CONVERTER
A converter from
LocalDate to the Spanner date type. |
static org.springframework.core.convert.converter.Converter<com.google.cloud.ByteArray,byte[]> |
SPANNER_TO_JAVA_BYTE_ARRAY_CONVERTER
A converter from the Spanner bytes type to a byte array.
|
static org.springframework.core.convert.converter.Converter<com.google.cloud.Date,Date> |
SPANNER_TO_JAVA_SQL_DATE_CONVERTER
A converter from the Spanner date type to
Date . |
static org.springframework.core.convert.converter.Converter<com.google.cloud.Timestamp,Timestamp> |
SPANNER_TO_JAVA_TIMESTAMP_CONVERTER
A converter from the Spanner instantaneous time type to
Timestamp . |
static org.springframework.core.convert.converter.Converter<com.google.cloud.Timestamp,Date> |
TIMESTAMP_DATE_CONVERTER
A converter from the Spanner timestamp type to
Date . |
static org.springframework.core.convert.converter.Converter<com.google.cloud.Timestamp,Instant> |
TIMESTAMP_INSTANT_CONVERTER
A converter from the Spanner instantaneous time type to
Instant . |
static org.springframework.core.convert.converter.Converter<com.google.cloud.Date,LocalDate> |
TIMESTAMP_LOCAL_DATE_CONVERTER
A converter from the Spanner date type to
LocalDate . |
static org.springframework.core.convert.converter.Converter<com.google.cloud.Timestamp,LocalDateTime> |
TIMESTAMP_LOCAL_DATE_TIME_CONVERTER
A converter from the Spanner timestamp type to
LocalDateTime . |
Modifier and Type | Method and Description |
---|---|
static com.google.cloud.Timestamp |
toTimestamp(Timestamp timestamp)
A utility function to convert a
Timestamp value to the Timestamp . |
public static final org.springframework.core.convert.converter.Converter<Date,com.google.cloud.Date> JAVA_SQL_TO_SPANNER_DATE_CONVERTER
Date
to the Spanner date type.public static final org.springframework.core.convert.converter.Converter<com.google.cloud.Date,Date> SPANNER_TO_JAVA_SQL_DATE_CONVERTER
Date
.public static final org.springframework.core.convert.converter.Converter<LocalDate,com.google.cloud.Date> LOCAL_DATE_TIMESTAMP_CONVERTER
LocalDate
to the Spanner date type.public static final org.springframework.core.convert.converter.Converter<com.google.cloud.Date,LocalDate> TIMESTAMP_LOCAL_DATE_CONVERTER
LocalDate
.public static final org.springframework.core.convert.converter.Converter<LocalDateTime,com.google.cloud.Timestamp> LOCAL_DATE_TIME_TIMESTAMP_CONVERTER
LocalDateTime
to the Spanner timestamp type.public static final org.springframework.core.convert.converter.Converter<com.google.cloud.Timestamp,LocalDateTime> TIMESTAMP_LOCAL_DATE_TIME_CONVERTER
LocalDateTime
.public static final org.springframework.core.convert.converter.Converter<Date,com.google.cloud.Timestamp> DATE_TIMESTAMP_CONVERTER
Date
to the Spanner timestamp type.public static final org.springframework.core.convert.converter.Converter<com.google.cloud.Timestamp,Date> TIMESTAMP_DATE_CONVERTER
Date
.public static final org.springframework.core.convert.converter.Converter<Instant,com.google.cloud.Timestamp> INSTANT_TIMESTAMP_CONVERTER
Instant
to the Spanner instantaneous time type.public static final org.springframework.core.convert.converter.Converter<com.google.cloud.Timestamp,Instant> TIMESTAMP_INSTANT_CONVERTER
Instant
.public static final org.springframework.core.convert.converter.Converter<Timestamp,com.google.cloud.Timestamp> JAVA_TO_SPANNER_TIMESTAMP_CONVERTER
Timestamp
to the Spanner instantaneous time type.public static final org.springframework.core.convert.converter.Converter<com.google.cloud.Timestamp,Timestamp> SPANNER_TO_JAVA_TIMESTAMP_CONVERTER
Timestamp
.public static final org.springframework.core.convert.converter.Converter<byte[],com.google.cloud.ByteArray> JAVA_TO_SPANNER_BYTE_ARRAY_CONVERTER
public static final org.springframework.core.convert.converter.Converter<com.google.cloud.ByteArray,byte[]> SPANNER_TO_JAVA_BYTE_ARRAY_CONVERTER
public static final Collection<org.springframework.core.convert.converter.Converter> DEFAULT_SPANNER_WRITE_CONVERTERS
public static final Collection<org.springframework.core.convert.converter.Converter> DEFAULT_SPANNER_READ_CONVERTERS
Copyright © 2022. All rights reserved.