Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 59 lines (46 sloc) 1.213 kB
3fe5603 @nberardi basic support DynamicCompositeType and CompositeType
nberardi authored
1 using System;
2 using FluentCassandra.Types;
3
4 namespace FluentCassandra.Operations
5 {
6 public class AddColumn : ColumnFamilyOperation<Void>
7 {
d576460 @nberardi made the type system more robus to support parsing of complex types f…
nberardi authored
8 public CassandraObject Key { get; private set; }
3fe5603 @nberardi basic support DynamicCompositeType and CompositeType
nberardi authored
9
d576460 @nberardi made the type system more robus to support parsing of complex types f…
nberardi authored
10 public CassandraObject SuperColumnName { get; private set; }
3fe5603 @nberardi basic support DynamicCompositeType and CompositeType
nberardi authored
11
d576460 @nberardi made the type system more robus to support parsing of complex types f…
nberardi authored
12 public CassandraObject ColumnName { get; private set; }
3fe5603 @nberardi basic support DynamicCompositeType and CompositeType
nberardi authored
13
14 public long ColumnValue { get; private set; }
15
16 #region ICassandraAction<Void> Members
17
18 public override Void Execute()
19 {
321da49 @nberardi refactoring of way operations happen, and created a wrapper for the c…
nberardi authored
20 var parent = new CassandraColumnParent {
21 ColumnFamily = ColumnFamily.FamilyName,
3fe5603 @nberardi basic support DynamicCompositeType and CompositeType
nberardi authored
22 };
23
24 if (SuperColumnName != null)
321da49 @nberardi refactoring of way operations happen, and created a wrapper for the c…
nberardi authored
25 parent.SuperColumn = SuperColumnName;
3fe5603 @nberardi basic support DynamicCompositeType and CompositeType
nberardi authored
26
321da49 @nberardi refactoring of way operations happen, and created a wrapper for the c…
nberardi authored
27 var column = new CassandraCounterColumn {
3fe5603 @nberardi basic support DynamicCompositeType and CompositeType
nberardi authored
28 Name = ColumnName,
29 Value = ColumnValue
30 };
31
2645bc7 @nberardi cleaned up the use of sessions in the code
nberardi authored
32 Session.GetClient().add(
3fe5603 @nberardi basic support DynamicCompositeType and CompositeType
nberardi authored
33 Key,
34 parent,
35 column,
2645bc7 @nberardi cleaned up the use of sessions in the code
nberardi authored
36 Session.WriteConsistency
3fe5603 @nberardi basic support DynamicCompositeType and CompositeType
nberardi authored
37 );
38
39 return new Void();
40 }
41
42 #endregion
43
d576460 @nberardi made the type system more robus to support parsing of complex types f…
nberardi authored
44 public AddColumn(CassandraObject key, CassandraObject name, long value)
3fe5603 @nberardi basic support DynamicCompositeType and CompositeType
nberardi authored
45 {
46 Key = key;
47 ColumnName = name;
48 ColumnValue = value;
49 }
50
d576460 @nberardi made the type system more robus to support parsing of complex types f…
nberardi authored
51 public AddColumn(CassandraObject key, CassandraObject superColumnName, CassandraObject name, long value)
3fe5603 @nberardi basic support DynamicCompositeType and CompositeType
nberardi authored
52 {
53 Key = key;
54 SuperColumnName = superColumnName;
55 ColumnName = name;
56 ColumnValue = value;
57 }
58 }
59 }
Something went wrong with that request. Please try again.