com.yandex.ydb.table.values.Value Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ydb-sdk-jdbc-uberjar Show documentation
Show all versions of ydb-sdk-jdbc-uberjar Show documentation
JDBC client implementation over Table client, single jar
The newest version!
package com.yandex.ydb.table.values;
import com.yandex.ydb.ValueProtos;
/**
* @author Sergey Polovko
*/
public interface Value {
Value[] EMPTY_ARRAY = {};
T getType();
ValueProtos.Value toPb();
default PrimitiveValue asData() {
return (PrimitiveValue) this;
}
default DictValue asDict() {
return (DictValue) this;
}
default ListValue asList() {
return (ListValue) this;
}
default OptionalValue asOptional() {
return (OptionalValue) this;
}
default StructValue asStuct() {
return (StructValue) this;
}
default VariantValue asVariant() {
return (VariantValue) this;
}
default VoidValue asVoid() {
return (VoidValue) this;
}
default OptionalValue makeOptional() {
return OptionalValue.of(this);
}
}