public interface DataType extends Detachable
The default implementations returned by the driver are immutable and serializable. If you write your own implementations, they should at least be thread-safe; serializability is not mandatory, but recommended for use with some 3rd-party tools like Apache Spark ™.
DataTypes| Modifier and Type | Method and Description |
|---|---|
String |
asCql(boolean includeFrozen,
boolean pretty)
Builds an appropriate representation for use in a CQL query.
|
int |
getProtocolCode()
The code of the data type in the native protocol specification.
|
attach, isDetachedint getProtocolCode()
@NonNull String asCql(boolean includeFrozen, boolean pretty)
includeFrozen - whether to include the frozen<...> keyword if applicable. This
will need to be set depending on where the result is used: for example, CREATE
TABLE statements use the frozen keyword, whereas it should never appear in CREATE
FUNCTION.pretty - whether to pretty-print UDT names (as described in CqlIdentifier.asCql(boolean).Copyright © 2017–2020. All rights reserved.