0

更新ステートメントで影響を受ける行を取得できますか?SpringデータCassandra - 影響を受ける行を取得する

public void removeCountry(String id,int version) throws VersionException { 
    log.debug("Update row"+id); 
    try { 
     Update update = QueryBuilder.update("country"); 
     update.setConsistencyLevel(ConsistencyLevel.ONE); 
     update.with(QueryBuilder.set("destroyed", true)); 
     update.where(QueryBuilder.eq("id",id)); 
     update.where(QueryBuilder.eq("version",version)); 
     cassandraOperations.execute(update); 
     //How to I know if the row was updated 
     int rows = 0;//complete 
     if (rows==0) throw new VersionException("Row does not been updated yet); 
    } catch (Exception e) { 
     log.error(e.getMessage(),e); 
    } 
} 

私はカサンドラと初心者ですので、私は、私は、JDBC操作のようにそれを行うことができるかどうか知りません。

答えて

1

私は、カッサンドラが様々なレベルの一貫性を持っていることを考えると、短い答えは「いいえ」です。

その他...例えば、SOの前に同様の質問を掲載している

How to know affected rows in Cassandra(CQL)?

関連する問題