title: Setting TTLs when inserting into Cassandra with the Datastax CQL driver
body: <p>Can anyone give me a hint as to why this doesn't work? It doesn't seem to set the TTL; the columns are never deleted. Messing around with INSERT INTO in cqlsh does, though, so there's nothing wrong with Cassandra itself.</p>
  
  <pre><code>    StringBuffer cql = new StringBuffer("INSERT INTO ");
      cql.append(getKeyspace());
      cql.append(".taskitems ");
      cql.append(/* long field list */);
      cql.append(" VALUES ");
      cql.append("(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) USING TTL 30");
      //cql.append(getTimeToLive()); // commented out, trying hardcoded value above
  
      PreparedStatement statement = session.prepare(cql.toString());
  
      session.execute( statement.bind(
          /* lots o' fields */    
      ));
  </code></pre>
  
  <p>(Cassandra v2.0.0, driver v1.0.)</p>