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 = false)
    struct Connection
    int
    update
    (
    T
    U
    )
    (
    U id
    ,
    Value[string] updates
    ,
    bool async = false
    )
  3. int update(U id, T updates, bool async = false)

Parameters

id
Type: U

the value of the relation's PK to filter by

updates
Type: Value[string]

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

async
Type: bool

optionally send this query async

Examples

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

Meta