com.holonplatform.datastore.jdbc.composer

## Interface SQLValueSerializer

-     public interface SQLValueSerializer

  SQL constant value serializer.
  Since:
    5.1.0

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SQLValueSerializer` | `getDefault()` Get the default `SQLValueSerializer`.
    `default String` | `serialize(Object value)` Serialize given value as a SQL string.
    `String` | `serialize(Object value, com.holonplatform.core.temporal.TemporalType temporalType)` Serialize given value as a SQL string.
    `Optional<String>` | `serializeTemporal(Object value, com.holonplatform.core.temporal.TemporalType temporalType)` Try to serialize given temporal value as a SQL string, using given `temporalType` to select a suitable serialization format.

- - ### Method Detail

    - #### serialize

          default String serialize(Object value)

      Serialize given value as a SQL string.
      Parameters:
        `value` - Value to serialize
      Returns:
        Serialized SQL value. A `null` value will be serialized as the `NULL` string

    - #### serialize

          String serialize(Object value,
                           com.holonplatform.core.temporal.TemporalType temporalType)

      Serialize given value as a SQL string.
      Parameters:
        `value` - Value to serialize
        `temporalType` - The `TemporalType` to use with temporal values
      Returns:
        Serialized SQL value. A `null` value will be serialized as the `NULL` string

    - #### serializeTemporal

          Optional<String> serializeTemporal(Object value,
                                             com.holonplatform.core.temporal.TemporalType temporalType)

      Try to serialize given temporal value as a SQL string, using given `temporalType` to select a suitable serialization format.
      Parameters:
        `value` - Value to serialize
        `temporalType` - Value temporal type
      Returns:
        Serialized SQL value, or an empty Optional if the value type is not supported by the serializer

    - #### getDefault

          static SQLValueSerializer getDefault()

      Get the default `SQLValueSerializer`.
      Returns:
        the default `SQLValueSerializer`

Copyright © 2019 The Holon Platform. All rights reserved.