Hi

In my Cassandra Java driver code, I am creating a query and then I print the 
consistency level of the query

val whereClause = whereConditions(tablename, id);         
cassandraRepositoryLogger.trace("getRowsByPartitionKeyId: looking in table 
"+tablename+" with partition key  "+partitionKeyColumns +" and values 
"+whereClause +" fetch size "+fetchSize)



    cassandraRepositoryLogger.trace("where clause is "+whereClause)

    cassandraRepositoryLogger.trace(s"consistency level 
${whereClause.getConsistencyLevel}")



But the print shows taht consistency level is null. Why? Shouldn't it be One by 
default?

2020-06-10 07:16:44,146 [TRACE] from repository.UsersRepository in 
scala-execution-context-global-115 - where clause is SELECT * FROM users WHERE 
bucket=109 AND email='manu.cha...@hotmail.com';

2020-06-10 07:16:44,146 [TRACE] from repository.UsersRepository in 
scala-execution-context-global-115 - getOneRowByPartitionKeyId: looking in 
table users with partition key  List(bucket, email) and values SELECT * FROM 
users WHERE bucket=109 AND email='manu.cha...@hotmail.com';

2020-06-10 07:16:44,146 [TRACE] from repository.UsersRepository in 
scala-execution-context-global-115 - consistency level null <-- Why is this 
null?



The query if build like follows

def whereConditions(tableName:String,id: UserKeys):Where= {

    QueryBuilder.select().from(tableName).where(QueryBuilder.eq("bucket", 
id.bucket))

      .and(QueryBuilder.eq("email", id.email))

  }

Thanks
Manu
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

Reply via email to