Connection.update

Similar to above update, but instead of acceptign a filter and and update string, always filters by the PK and updates with absolute values from the updates AA.

  1. int update(string filter, string update, U vals)
  2. int update(U id, Value[string] updates, bool async)
    struct Connection
    int
    update
    (
    T
    U
    )
    (
    U id
    ,
    Value[string] updates
    ,
    bool async = false
    )
  3. int update(U id, T updates, bool async)

Parameters

id U

the value of the relation's PK to filter by

updates Value[string]

an AA, mapping column name to the new value to be set for the column

async bool

optionally send this query async

Examples

Connection c; // en established connection
struct User { @PK int id; int x; string y }
c.update!User(1, [
      "x": Value(2),
      "y": Value("Hello there")]);

Meta