Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 65 lines (55 sloc) 1.77 kb
1cf7cf7 @nberardi added support for removal inserting, removing by key, and removing a …
nberardi authored
1 using System;
2f86912 @nberardi all tests now compile, so the new genericless types have been provide…
nberardi authored
2 using System.Linq;
ab0995d @nberardi laying framework for poco support
nberardi authored
3 using FluentCassandra.ObjectSerializer;
2db6327 @nberardi going through some changes to make the interface the objects more use…
nberardi authored
4 using FluentCassandra.Types;
1cf7cf7 @nberardi added support for removal inserting, removing by key, and removing a …
nberardi authored
5
6 namespace FluentCassandra
7 {
2f86912 @nberardi all tests now compile, so the new genericless types have been provide…
nberardi authored
8 [Obsolete("Use \"CassandraColumnFamily\" class with out generic type")]
9 public class CassandraColumnFamily<CompareWith> : CassandraColumnFamily
d576460 @nberardi made the type system more robus to support parsing of complex types f…
nberardi authored
10 where CompareWith : CassandraObject
2f86912 @nberardi all tests now compile, so the new genericless types have been provide…
nberardi authored
11 {
12 public CassandraColumnFamily(CassandraContext context, string columnFamily)
13 : base(context, columnFamily)
14 {
15 SetSchema(new CassandraColumnFamilySchema {
16 FamilyName = columnFamily,
17 ColumnNameType = typeof(CompareWith)
18 });
19 }
20 }
21
e1b11ad @nberardi [breaking change] with recent changes in the Cassandra API and the ne…
nberardi authored
22 public partial class CassandraColumnFamily : BaseCassandraColumnFamily
1cf7cf7 @nberardi added support for removal inserting, removing by key, and removing a …
nberardi authored
23 {
2f86912 @nberardi all tests now compile, so the new genericless types have been provide…
nberardi authored
24 private CassandraColumnFamilySchema _cachedSchema;
25
222aa24 @nberardi connections can now failover, pool, and load balance
nberardi authored
26 public CassandraColumnFamily(CassandraContext context, string columnFamily)
fdc415c @nberardi cleaned up the object conventions and also implimented the use of sch…
nberardi authored
27 : base(context, columnFamily) { }
2db6327 @nberardi going through some changes to make the interface the objects more use…
nberardi authored
28
cf74a33 @nberardi only get schema from server if one hasn't been cached for issue #81
nberardi authored
29 public CassandraColumnFamily(CassandraContext context, CassandraColumnFamilySchema schema)
30 : base(context, schema.FamilyName)
31 {
32 _cachedSchema = schema;
33 }
862aa3c @gillotte Allow for family column cache sharing between context/keyspace/column…
gillotte authored
34
d576460 @nberardi made the type system more robus to support parsing of complex types f…
nberardi authored
35 public FluentColumnFamily CreateRecord(CassandraObject key)
1cf7cf7 @nberardi added support for removal inserting, removing by key, and removing a …
nberardi authored
36 {
b9d2f58 @nberardi all tests pass after most recent changes
nberardi authored
37 if (key.GetValue<byte[]>().Length == 0)
5a77142 @nberardi fix for issue #12 relating to check if BytesType is 0 length on creat…
nberardi authored
38 throw new ArgumentException("'key' is not allowed to be zero length.", "key");
39
2f86912 @nberardi all tests now compile, so the new genericless types have been provide…
nberardi authored
40 return new FluentColumnFamily(key, FamilyName, GetSchema());
41 }
42
43 public override CassandraColumnFamilySchema GetSchema()
44 {
cf74a33 @nberardi only get schema from server if one hasn't been cached for issue #81
nberardi authored
45 if (_cachedSchema == null) {
46 var schema = Context.Keyspace.GetColumnFamilySchema(FamilyName);
4526a65 @nberardi some much needed refactoring of the schema
nberardi authored
47 _cachedSchema = (schema == null)
cf74a33 @nberardi only get schema from server if one hasn't been cached for issue #81
nberardi authored
48 ? new CassandraColumnFamilySchema(FamilyName, ColumnType.Standard)
49 : schema;
50 }
2f86912 @nberardi all tests now compile, so the new genericless types have been provide…
nberardi authored
51
52 return _cachedSchema;
53 }
54
55 public override void SetSchema(CassandraColumnFamilySchema schema)
56 {
57 _cachedSchema = schema;
58 }
59
60 public override void ClearCachedColumnFamilySchema()
61 {
62 _cachedSchema = null;
88be638 @nberardi did some clean up and Get is now supported for a single column
nberardi authored
63 }
1cf7cf7 @nberardi added support for removal inserting, removing by key, and removing a …
nberardi authored
64 }
acbb5c3 @nberardi update TimeUUID to get back the DateTime from the UUID that is generated
nberardi authored
65 }
Something went wrong with that request. Please try again.