Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 40 lines (35 sloc) 0.929 kb
e1b11ad Nick Berardi [breaking change] with recent changes in the Cassandra API and the new d...
nberardi authored
1 using System;
4526a65 Nick Berardi some much needed refactoring of the schema
nberardi authored
2 using Apache.Cassandra;
e1b11ad Nick Berardi [breaking change] with recent changes in the Cassandra API and the new d...
nberardi authored
3 using FluentCassandra.Types;
4
5 namespace FluentCassandra
6 {
7 public class CassandraColumnSchema
8 {
2f86912 Nick Berardi all tests now compile, so the new genericless types have been provided b...
nberardi authored
9 public CassandraColumnSchema()
10 {
d576460 Nick Berardi made the type system more robus to support parsing of complex types from...
nberardi authored
11 NameType = CassandraType.BytesType;
12 ValueType = CassandraType.BytesType;
2f86912 Nick Berardi all tests now compile, so the new genericless types have been provided b...
nberardi authored
13 }
14
d576460 Nick Berardi made the type system more robus to support parsing of complex types from...
nberardi authored
15 public CassandraColumnSchema(ColumnDef def, CassandraType columnNameType)
4526a65 Nick Berardi some much needed refactoring of the schema
nberardi authored
16 {
17 NameType = columnNameType;
f3bc872 Nick Berardi moved around some methods because they were on the wrong object
nberardi authored
18 Name = CassandraObject.GetCassandraObjectFromDatabaseByteArray(def.Name, columnNameType);
19 ValueType = CassandraType.GetCassandraType(def.Validation_class);
4526a65 Nick Berardi some much needed refactoring of the schema
nberardi authored
20 }
21
d576460 Nick Berardi made the type system more robus to support parsing of complex types from...
nberardi authored
22 private CassandraObject _name;
23 public CassandraObject Name
2f86912 Nick Berardi all tests now compile, so the new genericless types have been provided b...
nberardi authored
24 {
25 get { return _name; }
26 set
27 {
f3bc872 Nick Berardi moved around some methods because they were on the wrong object
nberardi authored
28 _name = value.GetValue(NameType);
e1b11ad Nick Berardi [breaking change] with recent changes in the Cassandra API and the new d...
nberardi authored
29 }
30 }
31
d576460 Nick Berardi made the type system more robus to support parsing of complex types from...
nberardi authored
32 public CassandraType NameType { get; set; }
33 public CassandraType ValueType { get; set; }
ea9226f Nick Berardi added support for CQL 3 and selecting the CQL version
nberardi authored
34
35 public static implicit operator CassandraColumnSchema(ColumnDef def)
36 {
37 return new CassandraColumnSchema(def, CassandraType.BytesType);
38 }
e1b11ad Nick Berardi [breaking change] with recent changes in the Cassandra API and the new d...
nberardi authored
39 }
40 }
Something went wrong with that request. Please try again.