Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Cassandra Validation Classes / Types

DZone's Guide to

Cassandra Validation Classes / Types

· Database Zone ·
Free Resource

Download the Altoros NoSQL Performance Benchmark 2018. Compare top NoSQL solutions – Couchbase Server v5.5, MongoDB v3.6, and DataStax Enterprise v6 (Cassandra).

Cassandra validates column names and row keys using validation classes.
This is put in place when you construct a columnFamily.

As an example, in the Thrift API:
CfDef columnFamily = new CfDef(KEYSPACE, COLUMN_FAMILY);
columnFamily.setKey_validation_class("UTF8Type");
columnFamily.setDefault_validation_class("UTF8Type"); 
The default_validation_class is used to validate row keys.
The key_validation_class is used to validate column names.

Googling didn't provide a handy list of validation classes for Cassandra.
So, here it is:

AsciiType.java BooleanType.java 
BytesType.java 
CompositeType.java 
DateType.java 
DecimalType.java 
DoubleType.java 
DynamicCompositeType.java 
FloatType.java 
Int32Type.java 
IntegerType.java 
LexicalUUIDType.java 
LocalByPartionerType.java 
LongType.java 
ReversedType.java 
TimeUUIDType.java 
TypeParser.java 
UTF8Type.java 
UUIDType.java

Source: http://brianoneill.blogspot.com/2012/02/cassandra-validation-classes-types.html

Download the whitepaper, Moving From Relational to NoSQL: How to Get Started. We’ll take you step by step through your first NoSQL project.

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}