Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

40 lines (35 sloc) 0.945 kb
using System;
using FluentCassandra.Apache.Cassandra;
using FluentCassandra.Types;
namespace FluentCassandra
{
public class CassandraColumnSchema
{
public CassandraColumnSchema()
{
NameType = CassandraType.BytesType;
ValueType = CassandraType.BytesType;
}
public CassandraColumnSchema(ColumnDef def, CassandraType columnNameType)
{
NameType = columnNameType;
Name = CassandraObject.GetCassandraObjectFromDatabaseByteArray(def.Name, columnNameType);
ValueType = CassandraType.GetCassandraType(def.Validation_class);
}
private CassandraObject _name;
public CassandraObject Name
{
get { return _name; }
set
{
_name = value.GetValue(NameType);
}
}
public CassandraType NameType { get; set; }
public CassandraType ValueType { get; set; }
public static implicit operator CassandraColumnSchema(ColumnDef def)
{
return new CassandraColumnSchema(def, CassandraType.BytesType);
}
}
}
Jump to Line
Something went wrong with that request. Please try again.