Skip to content
This repository
Browse code

small changes to the sandbox program to show more of the features

  • Loading branch information...
commit a909cb59dcf0aafd23c4dac567658a96554ee49f 1 parent 4f46cb4
Nick Berardi authored February 11, 2012
1  src/Linq/CqlQueryEvaluator.cs
@@ -8,6 +8,7 @@
8 8
 namespace FluentCassandra.Linq
9 9
 {
10 10
 	/// <see href="https://github.com/apache/cassandra/blob/trunk/doc/cql/CQL.textile"/>
  11
+	/// <see href="http://www.datastax.com/docs/1.0/references/cql/index"/>
11 12
 	internal class CqlQueryEvaluator
12 13
 	{
13 14
 		private string _columnFamily;
7  test/FluentCassandra.Sandbox/Program.cs
... ...
@@ -1,6 +1,5 @@
1 1
 using System;
2 2
 using System.Linq;
3  
-using System.Threading;
4 3
 using FluentCassandra.Connections;
5 4
 using FluentCassandra.Types;
6 5
 
@@ -25,10 +24,11 @@ private static void SetupKeyspace()
25 24
 					Name = KeyspaceName, 
26 25
 					Strategy = CassandraKeyspaceSchema.ReplicaPlacementStrategySimple, 
27 26
 					ReplicationFactor = 1 }, db);
  27
+
28 28
 				keyspace.TryCreateSelf();
29 29
 				db.ExecuteNonQuery(@"
30 30
 CREATE COLUMNFAMILY Posts (
31  
-	KEY text PRIMARY KEY,
  31
+	KEY ascii PRIMARY KEY,
32 32
 	Title text,
33 33
 	Body text,
34 34
 	Author text,
@@ -36,13 +36,14 @@ PostedOn timestamp
36 36
 );");
37 37
 				keyspace.TryCreateColumnFamily(new CassandraColumnFamilySchema {
38 38
 					FamilyName = "Tags",
39  
-					KeyType = CassandraType.UTF8Type,
  39
+					KeyType = CassandraType.AsciiType,
40 40
 					ColumnNameType = CassandraType.Int32Type,
41 41
 					DefaultColumnValueType = CassandraType.UTF8Type
42 42
 				});
43 43
 				keyspace.TryCreateColumnFamily(new CassandraColumnFamilySchema {
44 44
 					FamilyName = "Comments",
45 45
 					FamilyType = ColumnType.Super,
  46
+					KeyType = CassandraType.AsciiType,
46 47
 					SuperColumnNameType = CassandraType.TimeUUIDType,
47 48
 					ColumnNameType = CassandraType.UTF8Type,
48 49
 					DefaultColumnValueType = CassandraType.UTF8Type

0 notes on commit a909cb5

Please sign in to comment.
Something went wrong with that request. Please try again.