5. CQL3
•Basic auth, similar to mysql
• CREATE
• GRANT
USER bombadil WITH PASSWORD 'goldberry4ever' SUPERUSER;
ALTER ON KEYSPACE shire TO gandalf;
•Native drivers
•Support for collections (list, map, set)
•Hadoop support
•Tracing
•Native paging (2.0)
6. CQL3 examples
CREATE KEYSPACE shire WITH
REPLICATION = {'class': 'NetworkTopologyStrategy', 'eu' : 3, 'us-east' : 2};
SELECT * FROM emp WHERE empID IN (130,104) ORDER BY deptID DESC;
INSERT INTO excelsior.clicks (userid, url, date, name)
VALUES (
3715e600-2eb0-11e2-81c1-0800200c9a66,
‘http://cassandra.apache.org',
‘2013-10-09',
‘Mary')
USING TTL 86400;
UPDATE users
SET email = ‘charlie@wonka.com’
WHERE login = ‘cbucket64'
IF email = ‘cbucket@wonka.com’
10. Various other goodies
•Atomic batches for grouped updates
•Lightweight transactions
•Example: username creation
•Heavy operation (4 round-trips)
•Triggers (warning experimental in 2.0)
•CREATE TRIGGER <name> ON <table> USING <classname>;
11. Questions?
•Jeremy Hanna
•Support engineer at DataStax
•@jeromatron on twitter and #cassandra irc
•See also
•https://github.com/datastax/java-driver
•http://www.datastax.com/what-we-offer/products-services/devcenter
•http://www.datastax.com/docs
•http://www.datastax.com/dev/blog