Comments (5)
Currently you set the CQL version in the connection builder to differentiate the type of CQL you want to call.
var conn = new ConnectionBuilder(keyspace: "your keyspace", host: "your host", cqlVersion: FluentCassandra.Connections.CqlVersion.Cql3);
var session = new CassandraSession(conn);
var context = new CassandraContext(session);
var results = context.ExecquteQuery("your cql 3 query here;");
The problem with LINQ is that it is agnostic and there really isn't a good way of differentiating between the two different versions in LINQ. Because in something less than CQL3 you would want that token parameter to have an error thrown, while in CQL 3 you would want it to be included into the CQL query.
It is something I have been wrestling with lately.
from fluentcassandra.
Sorry closed by accident.
from fluentcassandra.
I was looking at your example, and what if the syntax looked like this.
var x = from u in _db.GetColumnFamily("example_table")
where CqlHelper.Token(u["idx"]) > 10001
select u;
That way you wouldn't have to implement every token equality sign. You would just need to implement the part that warps the property in token(idx)
. Do you think that would work better, I haven't had too much time to look at the new spec.
from fluentcassandra.
I belive that the intention of token(x) is to force the user to understand that Cassandra partitionKey is "token-ordered" - that have nothing in common with e.g. natural numbers ordering or string ordering. Therefore I belive that the situation would be better if we can use:
var x = from u in _db.GetColumnFamily("example_table")
where CqlHelper.Token(u["idx"]) > CqlHelper.Token(10001)
select u;
from fluentcassandra.
I see both sides of the comparison need to have token on them. In that case
your original idea might be better.
I am not as familiar with this as you, is there ever a case where token
will only be on one side?
Nick Berardi
(484) 302-0125
Sent on the go from my phone.
On Sep 4, 2012, at 4:46 AM, Pawel Kaplanski [email protected]
wrote:
I belive that the intention of token(x) is to force the user to understand
that Cassandra partitionKey is "token-ordered" - that have nothing in
common with e.g. natural numbers ordering or string ordering. Therefore I
belive that the situation would be better if we can use:
var x = from u in _db.GetColumnFamily("example_table")
where CqlHelper.Token(u["idx"]) > CqlHelper.Token(10001)
select u;
—
Reply to this email directly or view it on
GitHubhttps://github.com//issues/58#issuecomment-8256377.
from fluentcassandra.
Related Issues (20)
- FluentCassandra Thrift transport throws exception after idling due to Cassandra connection closed HOT 16
- Exception at insertion of an item with PRIMARY KEY of type BLOB HOT 8
- Composite columns HOT 4
- Direct Contributors Nomination HOT 2
- Is this fix the right thing to do? fix for issue #75: making sure null columns gets a proper default value HOT 6
- Error message reverses column family and keyspace in response
- High CPU utilization when reading with FluentCassandra HOT 1
- Memory leaking when working with large super columns
- Support for Blob Constant HOT 3
- exception should be thrown when cassandra is down HOT 2
- thrift client throws failed: unknown result or Bad protocol identifier HOT 3
- Switching build system to Albacore / Rake HOT 1
- Push Latest Code To NuGet HOT 1
- SingleServerManager goes into silent spin-loop on server failure HOT 14
- add Prepared Statement support
- Need updated documentation and more examples
- Incorrect code in MultiGetColumnCount.cs HOT 2
- Inserting composite key using API fails
- Various objects leaking HOT 5
- Multi-keyspace clusters cannot take advantage of connection pooling HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluentcassandra.