1

Closed

Make CassandraContext.Operate()-equivalent method public

description

There are a few APIs in Thrift where Cassandra.Client exposes but Cassandraemon does not support well yet. "remove" for example. We could add them, but some of them do not fit well in the LINQ world, and I think having an escape hatch isn't a bad thing.

ICassandraContext.Client is actually exposed, but it does not support automatic failover. I'd like similar functionality as Operate() method, which is internal today.

I was thinking about naming and signature, here's my proposal to use the same pattern as ExecuteCqlQuery:




public void ExecuteClient(Action<Cassandra.Client> action);
public T ExecuteClient<T>(Func<Cassandra.Client, T> action);




It passes Cassandra.Client as an argument, because doing so sometimes help to reduce the implicit creation of closure class by the compiler. The argument can be CassandraContext if others prefer.

Thoughts
Closed Jun 7, 2012 at 7:13 PM by kojiishi
Done, added APIs as proposed.

comments

sabro wrote Jun 8, 2012 at 3:58 AM

Good Job!