This repository has been archived by the owner on May 25, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nick Berardi
committed
Sep 5, 2010
1 parent
9e8c988
commit 50d830b
Showing
23 changed files
with
263 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,11 @@ | |||
- name: Testing | |||
replica_placement_strategy: org.apache.cassandra.locator.RackUnawareStrategy | |||
replication_factor: 1 | |||
column_families: | |||
- name: Standard | |||
compare_with: AsciiType | |||
|
|||
- name: Super | |||
column_type: Super | |||
compare_with: AsciiType | |||
compare_subcolumns_with: AsciiType |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,64 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using FluentCassandra.Types; | |||
using Apache.Cassandra; | |||
|
|||
namespace FluentCassandra.Test | |||
{ | |||
internal class _CassandraSetup | |||
{ | |||
public CassandraContext DB; | |||
public CassandraColumnFamily<AsciiType> Family; | |||
public CassandraSuperColumnFamily<AsciiType, AsciiType> SuperFamily; | |||
|
|||
public const string TestKey = "Test1"; | |||
public const string TestStandardName = "Test1"; | |||
public const string TestSuperName = "SubTest1"; | |||
|
|||
public _CassandraSetup() | |||
{ | |||
var keyspace = "Testing"; | |||
var server = new Server("localhost"); | |||
|
|||
var ksDef = new KsDef { | |||
Name = "Testing", | |||
Replication_factor = 1, | |||
Strategy_class = "org.apache.cassandra.locator.RackUnawareStrategy", | |||
Cf_defs = new List<CfDef>() | |||
}; | |||
|
|||
ksDef.Cf_defs.Add(new CfDef { | |||
Name = TestStandardName, | |||
Keyspace = "Testing", | |||
Column_type = "Standard", | |||
Comparator_type = "AsciiType", | |||
Comment = "Used for testing Standard family." | |||
}); | |||
|
|||
ksDef.Cf_defs.Add(new CfDef { | |||
Name = TestSuperName, | |||
Keyspace = "Testing", | |||
Column_type = "Super", | |||
Comparator_type = "AsciiType", | |||
Subcomparator_type = "AsciiType", | |||
Comment = "Used for testing Super family." | |||
}); | |||
|
|||
CassandraSession.AddKeyspace(server, ksDef); | |||
|
|||
DB = new CassandraContext(keyspace, server); | |||
Family = DB.GetColumnFamily<AsciiType>("Standard"); | |||
SuperFamily = DB.GetColumnFamily<AsciiType, AsciiType>("Super"); | |||
|
|||
Family.InsertColumn(TestKey, "Test1", Math.PI); | |||
Family.InsertColumn(TestKey, "Test2", Math.PI); | |||
Family.InsertColumn(TestKey, "Test3", Math.PI); | |||
|
|||
SuperFamily.InsertColumn(TestKey, TestSuperName, "Test1", Math.PI); | |||
SuperFamily.InsertColumn(TestKey, TestSuperName, "Test2", Math.PI); | |||
SuperFamily.InsertColumn(TestKey, TestSuperName, "Test3", Math.PI); | |||
} | |||
} | |||
} |
Oops, something went wrong.