com.amazon.redshift.jdbc2.ArrayAssistant Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redshift-jdbc42 Show documentation
Show all versions of redshift-jdbc42 Show documentation
Java JDBC 4.2 (JRE 8+) driver for Redshift database
The newest version!
/*
* Copyright (c) 2004, PostgreSQL Global Development Group
* See the LICENSE file in the project root for more information.
*/
package com.amazon.redshift.jdbc2;
/**
* Implement this interface and register the its instance to ArrayAssistantRegistry, to let Redshift
* driver to support more array type.
*
* @author Minglei Tu
*/
public interface ArrayAssistant {
/**
* get array base type.
*
* @return array base type
*/
Class> baseType();
/**
* build a array element from its binary bytes.
*
* @param bytes input bytes
* @param pos position in input array
* @param len length of the element
* @return array element from its binary bytes
*/
Object buildElement(byte[] bytes, int pos, int len);
/**
* build an array element from its literal string.
*
* @param literal string representation of array element
* @return array element
*/
Object buildElement(String literal);
}