Interface Row
-
- All Superinterfaces:
AccessibleById,AccessibleByIndex,AccessibleByName,Data,Detachable,GettableById,GettableByIndex,GettableByName
- All Known Subinterfaces:
ReactiveRow
public interface Row extends GettableByIndex, GettableByName, GettableById, Detachable
A row from a CQL table.The default implementation returned by the driver is immutable and serializable. If you write your own implementation, it should at least be thread-safe; serializability is not mandatory, but recommended for use with some 3rd-party tools like Apache Spark ™.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ColumnDefinitionsgetColumnDefinitions()default StringgetFormattedContents()Returns a string representation of the contents of this row.StringtoString()Returns an abstract representation of this object, that may not include the row's contents.-
Methods inherited from interface com.datastax.oss.driver.api.core.data.AccessibleById
allIndicesOf, firstIndexOf, getType
-
Methods inherited from interface com.datastax.oss.driver.api.core.data.AccessibleByIndex
getType, size
-
Methods inherited from interface com.datastax.oss.driver.api.core.data.AccessibleByName
allIndicesOf, firstIndexOf, getType
-
Methods inherited from interface com.datastax.oss.driver.api.core.data.Data
codecRegistry, protocolVersion
-
Methods inherited from interface com.datastax.oss.driver.api.core.detach.Detachable
attach, isDetached
-
Methods inherited from interface com.datastax.oss.driver.api.core.data.GettableById
get, get, get, getBigDecimal, getBigInteger, getBool, getBoolean, getByte, getByteBuffer, getBytesUnsafe, getCqlDuration, getDouble, getFloat, getInetAddress, getInstant, getInt, getList, getLocalDate, getLocalTime, getLong, getMap, getObject, getSet, getShort, getString, getToken, getTupleValue, getUdtValue, getUuid, getVector, isNull
-
Methods inherited from interface com.datastax.oss.driver.api.core.data.GettableByIndex
get, get, get, getBigDecimal, getBigInteger, getBool, getBoolean, getByte, getByteBuffer, getBytesUnsafe, getCqlDuration, getDouble, getFloat, getInetAddress, getInstant, getInt, getList, getLocalDate, getLocalTime, getLong, getMap, getObject, getSet, getShort, getString, getToken, getTupleValue, getUdtValue, getUuid, getVector, isNull
-
Methods inherited from interface com.datastax.oss.driver.api.core.data.GettableByName
get, get, get, getBigDecimal, getBigInteger, getBool, getBoolean, getByte, getByteBuffer, getBytesUnsafe, getCqlDuration, getDouble, getFloat, getInetAddress, getInstant, getInt, getList, getLocalDate, getLocalTime, getLong, getMap, getObject, getSet, getShort, getString, getToken, getTupleValue, getUdtValue, getUuid, getVector, isNull
-
-
-
-
Method Detail
-
getColumnDefinitions
@NonNull ColumnDefinitions getColumnDefinitions()
- Returns:
- the column definitions contained in this result set.
-
getFormattedContents
@NonNull default String getFormattedContents()
Returns a string representation of the contents of this row.This produces a comma-separated list enclosed in square brackets. Each column is represented by its name, followed by a column and the value as a CQL literal. For example:
[id:1, name:'test']
Notes:- This method does not sanitize its output in any way. In particular, no effort is made to limit output size: all columns are included, and large strings or blobs will be appended as-is.
- Be mindful of how you expose the result. For example, in high-security environments, it might be undesirable to leak data in application logs.
-
toString
String toString()
Returns an abstract representation of this object, that may not include the row's contents.The driver's built-in
Rowimplementation returns the default format ofObject.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().
-
-