How To Do Updates?

You can do arbitrary SQL commands here.
The most common one is UPDATE-ing some rows:

// returns number of affected rows
def updateCustomers: Int = ctx.run {
  sql"""
    UPDATE customers
    SET name = 'whatever'
    WHERE name LIKE 'xyz_%'
  """.update()
}

But of course you can do other commands as well:

def createTable: Unit = ctx.run {
  sql"""
    CREATE TABLE customers(
      id SERIAL PRIMARY KEY,
      name VARCHAR
    )
  """.update()
}