adjust for Scala: immutable outside-SQL