Package | Description |
---|---|
com.datastax.driver.core |
The main package for the DataStax Java driver for Cassandra.
|
com.datastax.driver.core.exceptions |
Exceptions thrown by the DataStax Java driver for Cassandra.
|
com.datastax.driver.core.querybuilder |
A CQL3 query builder.
|
com.datastax.driver.core.schemabuilder |
A CQL3 schema builder.
|
Modifier and Type | Class and Description |
---|---|
static class |
DataType.CollectionType
Instances of this class represent collection types, that is, lists, sets or maps.
|
static class |
DataType.CustomType
A "custom" type is a type that cannot be expressed as a CQL type.
|
static class |
DataType.NativeType
Instances of this class represent CQL native types, also known as CQL primitive types.
|
class |
TupleType
A tuple type.
|
class |
UserType
A User Defined Type (UDT).
|
Modifier and Type | Field and Description |
---|---|
protected DataType |
TypeCodec.cqlType |
Modifier and Type | Method and Description |
---|---|
static DataType |
DataType.ascii()
Returns the ASCII type.
|
static DataType |
DataType.bigint()
Returns the BIGINT type.
|
static DataType |
DataType.blob()
Returns the BLOB type.
|
static DataType |
DataType.cboolean()
Returns the BOOLEAN type.
|
static DataType |
DataType.cdouble()
Returns the DOUBLE type.
|
static DataType |
DataType.cfloat()
Returns the FLOAT type.
|
static DataType |
DataType.cint()
Returns the INT type.
|
static DataType |
DataType.counter()
Returns the COUNTER type.
|
static DataType |
DataType.date()
Returns the DATE type.
|
static DataType |
DataType.decimal()
Returns the DECIMAL type.
|
static DataType |
DataType.duration()
Returns the Duration type, introduced in Cassandra 3.10.
|
DataType |
TypeCodec.getCqlType()
Return the CQL type that this codec deserializes from and serializes to.
|
DataType |
UserType.getFieldType(String name)
Returns the type of a given field.
|
DataType |
AggregateMetadata.getReturnType()
Returns the return type of this aggregate.
|
DataType |
FunctionMetadata.getReturnType()
Returns the return type of this function.
|
DataType |
AggregateMetadata.getStateType()
Returns the state type of this aggregate.
|
DataType |
ColumnMetadata.getType()
Returns the type of the column.
|
abstract DataType |
Token.getType()
Returns the data type of this token's value.
|
DataType |
UserType.Field.getType()
Returns the type of the field.
|
DataType |
ColumnDefinitions.Definition.getType()
Returns the type of the column.
|
protected DataType |
UDTValue.getType(int i) |
protected DataType |
TupleValue.getType(int i) |
DataType |
ColumnDefinitions.getType(int i)
Returns the type of the
i th column in this metadata. |
DataType |
ColumnDefinitions.getType(String name)
Returns the type of the first occurrence of
name in this metadata. |
static DataType |
DataType.inet()
Returns the INET type.
|
static DataType |
DataType.smallint()
Returns the SMALLINT type.
|
static DataType |
DataType.text()
Returns the TEXT type.
|
static DataType |
DataType.time()
Returns the TIME type.
|
static DataType |
DataType.timestamp()
Returns the TIMESTAMP type.
|
static DataType |
DataType.timeuuid()
Returns the TIMEUUID type.
|
static DataType |
DataType.tinyint()
Returns the TINYINT type.
|
static DataType |
DataType.uuid()
Returns the UUID type.
|
static DataType |
DataType.varchar()
Returns the VARCHAR type.
|
static DataType |
DataType.varint()
Returns the VARINT type.
|
Modifier and Type | Method and Description |
---|---|
static Set<DataType> |
DataType.allPrimitiveTypes()
Returns a set of all the primitive types, where primitive types are defined as the types that
don't have type arguments (that is excluding lists, sets, maps, tuples and udts).
|
Map<String,DataType> |
FunctionMetadata.getArguments()
Returns the names and types of this function's arguments.
|
List<DataType> |
AggregateMetadata.getArgumentTypes()
Returns the types of this aggregate's arguments.
|
List<DataType> |
TupleType.getComponentTypes()
The (immutable) list of types composing this tuple type.
|
List<DataType> |
DataType.getTypeArguments()
Returns the type arguments of this type.
|
List<DataType> |
DataType.CollectionType.getTypeArguments() |
Modifier and Type | Method and Description |
---|---|
boolean |
TypeCodec.accepts(DataType cqlType)
Return
true if this codec is capable of deserializing the given cqlType . |
boolean |
TypeCodec.AbstractTupleCodec.accepts(DataType cqlType) |
<T> TypeCodec<T> |
CodecRegistry.codecFor(DataType cqlType)
|
<T> TypeCodec<T> |
CodecRegistry.codecFor(DataType cqlType,
Class<T> javaType)
|
<T> TypeCodec<T> |
CodecRegistry.codecFor(DataType cqlType,
T value)
|
<T> TypeCodec<T> |
CodecRegistry.codecFor(DataType cqlType,
TypeToken<T> javaType)
|
static DataType.CollectionType |
DataType.frozenList(DataType elementType)
Returns the type of frozen lists of
elementType elements. |
static DataType.CollectionType |
DataType.frozenMap(DataType keyType,
DataType valueType)
Returns the type of frozen maps of
keyType to valueType elements. |
static DataType.CollectionType |
DataType.frozenSet(DataType elementType)
Returns the type of frozen sets of
elementType elements. |
AggregateMetadata |
KeyspaceMetadata.getAggregate(String name,
DataType... argumentTypes)
Returns the definition of an aggregate in this keyspace.
|
FunctionMetadata |
KeyspaceMetadata.getFunction(String name,
DataType... argumentTypes)
Returns the definition of a function in this keyspace.
|
static DataType.CollectionType |
DataType.list(DataType elementType)
Returns the type of "not frozen" lists of
elementType elements. |
static DataType.CollectionType |
DataType.list(DataType elementType,
boolean frozen)
Returns the type of lists of
elementType elements. |
static DataType.CollectionType |
DataType.map(DataType keyType,
DataType valueType)
Returns the type of "not frozen" maps of
keyType to valueType elements. |
static DataType.CollectionType |
DataType.map(DataType keyType,
DataType valueType,
boolean frozen)
Returns the type of maps of
keyType to valueType elements. |
TupleType |
Metadata.newTupleType(DataType... types)
Creates a tuple type given a list of types.
|
static TupleType |
TupleType.of(ProtocolVersion protocolVersion,
CodecRegistry codecRegistry,
DataType... types)
Creates a "disconnected" tuple type (you should prefer
cluster.getMetadata().newTupleType(...) whenever
possible). |
static DataType.CollectionType |
DataType.set(DataType elementType)
Returns the type of "not frozen" sets of
elementType elements. |
static DataType.CollectionType |
DataType.set(DataType elementType,
boolean frozen)
Returns the type of sets of
elementType elements. |
Modifier and Type | Method and Description |
---|---|
AggregateMetadata |
KeyspaceMetadata.getAggregate(String name,
Collection<DataType> argumentTypes)
Returns the definition of an aggregate in this keyspace.
|
FunctionMetadata |
KeyspaceMetadata.getFunction(String name,
Collection<DataType> argumentTypes)
Returns the definition of a function in this keyspace.
|
TupleType |
Metadata.newTupleType(List<DataType> types)
Creates a tuple type given a list of types.
|
Constructor and Description |
---|
PrimitiveBooleanCodec(DataType cqlType) |
PrimitiveByteCodec(DataType cqlType) |
PrimitiveDoubleCodec(DataType cqlType) |
PrimitiveFloatCodec(DataType cqlType) |
PrimitiveIntCodec(DataType cqlType) |
PrimitiveLongCodec(DataType cqlType) |
PrimitiveShortCodec(DataType cqlType) |
TypeCodec(DataType cqlType,
Class<T> javaClass)
This constructor can only be used for non parameterized types.
|
TypeCodec(DataType cqlType,
TypeToken<T> javaType) |
Modifier and Type | Method and Description |
---|---|
DataType |
CodecNotFoundException.getCqlType() |
Constructor and Description |
---|
CodecNotFoundException(String msg,
DataType cqlType,
TypeToken<?> javaType) |
CodecNotFoundException(Throwable cause,
DataType cqlType,
TypeToken<?> javaType) |
Modifier and Type | Method and Description |
---|---|
Select.SelectionOrAlias |
Select.Selection.cast(Object column,
DataType targetType)
Creates a cast of an expression to a given CQL type.
|
Select.SelectionOrAlias |
Select.SelectionOrAlias.cast(Object column,
DataType targetType) |
static Object |
QueryBuilder.cast(Object column,
DataType dataType)
Creates a Cast of a column using the given dataType.
|
Modifier and Type | Method and Description |
---|---|
Create |
Create.addClusteringColumn(String columnName,
DataType dataType)
Add a clustering column definition to this CREATE TABLE statement.
|
T |
AbstractCreateStatement.addColumn(String columnName,
DataType dataType)
Add a column definition to this CREATE statement.
|
Create |
Create.addPartitionKey(String columnName,
DataType dataType)
Add a partition key column definition to this CREATE TABLE statement.
|
Create |
Create.addStaticColumn(String columnName,
DataType dataType)
Add a static column definition to this CREATE TABLE statement.
|
T |
AbstractCreateStatement.addUDTMapColumn(String columnName,
DataType keyType,
UDTType valueUdtType)
Shorthand to add a column definition to this CREATE statement, when the type is a map with a
UDT value type.
|
T |
AbstractCreateStatement.addUDTMapColumn(String columnName,
UDTType udtKeyType,
DataType valueType)
Shorthand to add a column definition to this CREATE statement, when the type is a map with a
UDT key type.
|
SchemaStatement |
Alter.AlterColumn.type(DataType type)
Define the new type of the altered column.
|
SchemaStatement |
Alter.AddColumn.type(DataType type)
Define the type of the added column.
|
Copyright © 2012–2024. All rights reserved.