Light
Dark
System
1.0latest

Update

Update objects with the e.update function.

Copy
e.update(e.Movie, movie => ({
  filter: e.op(movie.title, '=', e.str("Avengers 4")),
  set: {
    title: "Avengers: Endgame"
  }
}))

The parameter object supports the full set of clauses for filtering, ordering, and pagination.

Copy
e.update(e.Movie, movie => ({
  filter: ...,
  order_by: ...,
  offset: ...,
  limit: ...,
  set: {
    // ...
  }
}))

You can reference the current value of the object’s properties.

Copy
e.update(e.Movie, movie => ({
  filter: e.op(movie.title[0], '=', ' '),
  set: {
    title: e.str_trim(movie.title)
  }
}))
Light
Dark
System