Permalink
Browse files

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

  • Loading branch information...
1 parent 4f46cb4 commit a909cb59dcf0aafd23c4dac567658a96554ee49f @nberardi nberardi committed Feb 11, 2012
Showing with 5 additions and 3 deletions.
  1. +1 −0 src/Linq/CqlQueryEvaluator.cs
  2. +4 −3 test/FluentCassandra.Sandbox/Program.cs
View
1 src/Linq/CqlQueryEvaluator.cs
@@ -8,6 +8,7 @@
namespace FluentCassandra.Linq
{
/// <see href="https://github.com/apache/cassandra/blob/trunk/doc/cql/CQL.textile"/>
+ /// <see href="http://www.datastax.com/docs/1.0/references/cql/index"/>
internal class CqlQueryEvaluator
{
private string _columnFamily;
View
7 test/FluentCassandra.Sandbox/Program.cs
@@ -1,6 +1,5 @@
using System;
using System.Linq;
-using System.Threading;
using FluentCassandra.Connections;
using FluentCassandra.Types;
@@ -25,24 +24,26 @@ private static void SetupKeyspace()
Name = KeyspaceName,
Strategy = CassandraKeyspaceSchema.ReplicaPlacementStrategySimple,
ReplicationFactor = 1 }, db);
+
keyspace.TryCreateSelf();
db.ExecuteNonQuery(@"
CREATE COLUMNFAMILY Posts (
- KEY text PRIMARY KEY,
+ KEY ascii PRIMARY KEY,
Title text,
Body text,
Author text,
PostedOn timestamp
);");
keyspace.TryCreateColumnFamily(new CassandraColumnFamilySchema {
FamilyName = "Tags",
- KeyType = CassandraType.UTF8Type,
+ KeyType = CassandraType.AsciiType,
ColumnNameType = CassandraType.Int32Type,
DefaultColumnValueType = CassandraType.UTF8Type
});
keyspace.TryCreateColumnFamily(new CassandraColumnFamilySchema {
FamilyName = "Comments",
FamilyType = ColumnType.Super,
+ KeyType = CassandraType.AsciiType,
SuperColumnNameType = CassandraType.TimeUUIDType,
ColumnNameType = CassandraType.UTF8Type,
DefaultColumnValueType = CassandraType.UTF8Type

0 comments on commit a909cb5

Please sign in to comment.