Having a table with the columns
class Data(tag: Tag) extends Table[DataRow](tag, \"data\") {
def id = column[Int](\"id\", O.PrimaryKey)
def name = column
Building on JonasAnso's answer, converting that to slick v3.0+, and putting it into a transaction:
def partialUpdate(id: Int, name: Option[String], login: Option[String]): Future[Int] = {
val selectQ = users.filter(_.id === id)
val query = selectQ.result.head.flatMap { data =>
selectQ.update(data.patch(name, login))
}
db.run(query)
}