Connection.update

Similar to above, but accepts the whole structure as an update param. Filters by the PK, updates ALL the values in the filtered rows.

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

Parameters

id U

value of the relation's PK to filter by

updates T

the structure that will provide values for the UPDATE

Examples

Connection c; // an established connection
struct User { @PK int id; int a; int b; }
c.update(1, myUser);

Meta