public interface TupleValue extends GettableByIndex, SettableByIndex<TupleValue>
tuple
value.
It is an ordered set of anonymous, typed fields.
A tuple value is attached if and only if its type is attached (see Detachable
).
The default implementation returned by the driver is mutable and serializable. If you write your own implementation, serializability is not mandatory, but recommended for use with some 3rd-party tools like Apache Spark ™.
Modifier and Type | Method and Description |
---|---|
default String |
getFormattedContents()
Returns a string representation of the contents of this tuple.
|
TupleType |
getType() |
String |
toString()
Returns an abstract representation of this object, that may not include the tuple's
contents.
|
get, get, get, getBigDecimal, getBigInteger, getBoolean, getByte, getByteBuffer, getBytesUnsafe, getCqlDuration, getDouble, getFloat, getInetAddress, getInstant, getInt, getList, getLocalDate, getLocalTime, getLong, getMap, getObject, getSet, getShort, getString, getToken, getTupleValue, getUdtValue, getUuid, isNull
set, set, set, setBigDecimal, setBigInteger, setBoolean, setByte, setByteBuffer, setBytesUnsafe, setCqlDuration, setDouble, setFloat, setInetAddress, setInstant, setInt, setList, setLocalDate, setLocalTime, setLong, setMap, setSet, setShort, setString, setToken, setToNull, setTupleValue, setUdtValue, setUuid
getType, size
codecRegistry, protocolVersion
@NonNull TupleType getType()
@NonNull default String getFormattedContents()
This produces a CQL literal, for example:
(1,'test')Notes:
String toString()
The driver's built-in TupleValue
implementation returns the default format of Object.toString()
: the class name, followed by the at-sign and the hash code of the object.
Omitting the contents was a deliberate choice, because we feel it would make it too easy to
accidentally leak data (e.g. in application logs). If you want the contents, use getFormattedContents()
.
Copyright © 2017–2024. All rights reserved.