Isvara
Isvara

Reputation: 3463

How does Phantom DSL for Cassandra actually connect?

I'd like to use the Phantom DSL for Cassandra from Scala. I've noted that it uses the Datastax Java driver underneath, but I don't see anything in the documentation about how to actually connect or configure a connection. The included tests use an embedded Cassandra, so that doesn't help. Are there any detailed examples or tutorials for this library?

Upvotes: 7

Views: 2410

Answers (1)

Eugene Zhulenev
Eugene Zhulenev

Reputation: 9734

To run operations with Phantom "tables" you need to have implicit Session object in scope. One way to achieve that is CassandraConnector, and you can build connectors using ContactPoint. For instance you can use this example.

Or you can build your own way of initializing implicit Session.

Update

Additionally you can read about connectors in more depth on this blog post.

Upvotes: 2

Related Questions