Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Example about how to use map cql type with DataStax java driver

I am trying to use the datastax java driver to update and query a column family that has a map field. Does anyone an example about how to use cql collections with the Datastax Java Driver?

Thanks

like image 209
ftrujillo Avatar asked Dec 03 '13 13:12

ftrujillo


1 Answers

I will add some examples of using the CQL collections with both simple and prepared statements to the current Java driver doc.

You can use CQL collections with prepared statements. There's an example in the Java driver doc in the quick start section.

http://docs.datastax.com/en/developer/java-driver/2.0/java-driver/quick_start/qsSimpleClientBoundStatements_t.html

Step 4 binds a Java HashSet object to a CQL set column in the songs table.

like image 152
Jim Bisso Avatar answered Jan 01 '23 14:01

Jim Bisso