Package org.jdbi.v3.postgres.internal
Class ByteaArrayType
java.lang.Object
org.jdbi.v3.postgres.internal.ByteaArrayType
- All Implemented Interfaces:
SqlArrayType<byte[]>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertArrayElement(byte[] element) Returns an equivalent value in a type supported by the JDBC vendor.Class<?>Returns the element class that is used to create the backing array.Returns the vendor-specific SQL type nameStringfor the element typeT.
-
Constructor Details
-
ByteaArrayType
public ByteaArrayType()
-
-
Method Details
-
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
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
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
-