io.jdbd.vendor.stmt.Value Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jdbd-vendor Show documentation
Show all versions of jdbd-vendor Show documentation
jdbd-vendor comment class for driver vendor if driver vendor need
package io.jdbd.vendor.stmt;
import io.jdbd.lang.Nullable;
import io.jdbd.meta.DataType;
import io.jdbd.statement.Parameter;
/**
*
* This interface representing a value that is bound to sql.
* This is a base interface of below interface:
*
* - {@link ParamValue}
* - {@link NamedValue }
*
*
*
*
* @see ParamValue
* @see NamedValue
*/
public interface Value {
/**
* Get parameter value
*
* @return
* - null
* - non-{@link Parameter} instance
* - {@link Parameter instance}
*
*/
@Nullable
Object get();
/**
* Get parameter value,throw {@link NullPointerException} if value is null
* @return
* - non-{@link Parameter} instance
* - {@link Parameter instance}
*
* @throws NullPointerException throw when param is null
*/
Object getNonNull() throws NullPointerException;
/**
* Get parameter type
* @return sql type of bind value.
*/
DataType getType();
}