1

I do not see a way to execute my sql insert statement without using scalikejdbc's update or execute functions, both of which turn my insert into an upsert.

  sql"""INSERT INTO scopes (id, name, status, level) VALUES ($id, $name, $status, $level)""".update.apply()

I expect the scope to be inserted only if a scope with the same ID does not exist in the DB. Otherwise I expect it to throw an error.

In reality, if the scope already exists, this code updates it.

naomie
  • 11
  • 1

0 Answers0