Reputation: 11
I'm encountering an issue while attempting to update data in ScyllaDB using Go. Below is the code snippet I'm using for updating a session record:
func (q *Queries) EndSession(Sessionid string) error {
tableName := fmt.Sprintf("%s.session", q.keyspace)
uuid, _ := gocql.ParseUUID(Sessionid)
stmt := qb.Update(tableName).
SetLit("logout_at", time.Now().Format(time.RFC3339)).
SetLit("is_logout", strconv.FormatBool(true)).
Where(qb.Eq("session_id")).Query(q.session)
stmt.BindMap(qb.M{"session_id": uuid})
if err := stmt.ExecRelease(); err != nil {
return err
}
return nil
}
I logged the bug and got "message": "line 1:43 : Syntax error", I think i can't bind data into "session_id" field
Upvotes: 1
Views: 61