ScanCAS()
& MapScanCAS()
are returning the values of the database row(old), only if the insert statement is not applied on a database table.
insertQuery = "INSERT INTO my_table (id, column1, column2) " + "VALUES (?, ?, toTimeStamp(now())) IF NOT EXISTS"
applied, err := session.Query(insertQuery,ID,column1).ScanCAS(&id,
&value1,
&value2)
How to bind the values of table row, upon successful insert? because ScanCAS
binds the values(previous) only with failed attempt of insert query....