Package org.jdbi.v3.core.array
Interface SqlArrayType<T>
- Type Parameters:
T
- the array element type
public interface SqlArrayType<T>
Strategy for converting elements of array-like arguments into SQL array elements.
-
Method Summary
Modifier and TypeMethodDescriptionconvertArrayElement
(T element) Returns an equivalent value in a type supported by the JDBC vendor.Returns the vendor-specific SQL type nameString
for the element typeT
.static <T> SqlArrayType<T>
Create a SqlArrayType from the given type and convert function.
-
Method Details
-
getTypeName
String getTypeName()Returns the vendor-specific SQL type nameString
for the element typeT
. This value will be passed toConnection.createArrayOf(String, Object[])
to create SQL arrays.- Returns:
- the type name
-
convertArrayElement
Returns an equivalent value in a type supported by the JDBC vendor. If element typeT
is already supported by the JDBC vendor, this method may returnelement
without modification.- Parameters:
element
- the element to convert- Returns:
- the converted element
-
of
Create a SqlArrayType from the given type and convert function.- Parameters:
typeName
- the vendor sql type to useconversion
- convert the array element to the jdbc representation- Returns:
- the created array type
-