title: Multiple IF conditions in Cassandra lightweight transactions/CAS
body: <p>So I'm trying to do a CAS (compare-and-set) type operation in Cassandra, where I want to do a data update only if a particular non-primary-key column is <code>NULL</code> or <code>&lt; ?</code> where <code>?</code> is supplied by client-side code.</p>
  
  <p>How do I do this? Something like the following <strong>doesn't</strong> work:</p>
  
  <pre><code>UPDATE my_dbs.foo SET col1=5 WHERE id=1 IF (col1 = NULL OR col1 &lt; 4);
  </code></pre>
  
  <p>The error I get is similar to the following:</p>
  
  <pre><code>SyntaxException: &lt;ErrorMessage code=2000 [Syntax error in CQL query] message="line 1:149 no viable alternative at input '(' (...
  </code></pre>
  
  <p>How do I do this in Cassandra 2.0/2.1?</p>