sum<U extends num> method

Future<U> sum <U extends num>(U selector(T object))

Finds the sum of some ManagedObject property.

selector identifies the property being evaluated, e.g.

    var query = new Query<User>();
    var yearsLivesByAllUsers = await query.reduce.sum((user) => user.age);

The property must be an attribute and its type must be an num, i.e. int or double.

Implementation

Future<U> sum<U extends num>(U selector(T object));