Package org.jdbi.v3.postgres.internal
Class ByteaArrayType
- java.lang.Object
-
- org.jdbi.v3.postgres.internal.ByteaArrayType
-
- All Implemented Interfaces:
SqlArrayType<byte[]>
public final class ByteaArrayType extends java.lang.Object implements SqlArrayType<byte[]>
-
-
Constructor Summary
Constructors Constructor Description ByteaArrayType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectconvertArrayElement(byte[] element)Returns an equivalent value in a type supported by the JDBC vendor.java.lang.Class<?>getArrayElementClass()Returns the element class that is used to create the backing array.java.lang.StringgetTypeName()Returns the vendor-specific SQL type nameStringfor the element typeT.
-
-
-
Method Detail
-
getTypeName
public java.lang.String getTypeName()
Description copied from interface:SqlArrayTypeReturns the vendor-specific SQL type nameStringfor the element typeT. This value will be passed toConnection.createArrayOf(String, Object[])to create SQL arrays.- Specified by:
getTypeNamein interfaceSqlArrayType<byte[]>- Returns:
- the type name
-
getArrayElementClass
public java.lang.Class<?> getArrayElementClass()
Description copied from interface:SqlArrayTypeReturns the element class that is used to create the backing array. By default,Objectis used and the backing array is anObject[]array. Can be overridden if a more specific type is needed.- Specified by:
getArrayElementClassin interfaceSqlArrayType<byte[]>- Returns:
- A
Classinstance which is used withArray.newInstance(Class, int).
-
convertArrayElement
public java.lang.Object convertArrayElement(byte[] element)
Description copied from interface:SqlArrayTypeReturns an equivalent value in a type supported by the JDBC vendor. If element typeTis already supported by the JDBC vendor, this method may returnelementwithout modification.- Specified by:
convertArrayElementin interfaceSqlArrayType<byte[]>- Parameters:
element- the element to convert- Returns:
- the converted element
-
-