session.Prepare(“UPDATE Wallet SET Balance = Balance + ? WHERE UserId = ? IF (Balance + ?) >= 0”)
raises exception:
Cassandra.InvalidQueryException: ‘Invalid Function Call. Failed calling ‘+(double,anytype)’. Found too many matches for builtin function ‘+’
UPDATE Wallet SET Balance = Balance + ? WHERE UserId = ? IF (Balance + ?) >= 0
^
(ql error -214)’
but it works with constants:
session.Prepare(@“UPDATE Wallet SET Balance = Balance + 3 WHERE UserId = ? IF (Balance + 3) >= 0”)