Similar to join, computes the join between two sets of relations, using the given keys in kmap
only for joining and ignoring others. kmap
can also be used to translate join keys in b
where needed. Else, if no renaming is desired, the values in kmap
should be the same as their respective keys, e.g. {id: "id"}
. Returns new set of same type as a
.
Generated using TypeDoc
Computes the natural join between the two sets of relations. Each set is assumed to have plain objects as values with at least one of the keys present in both sides. Furthermore the objects in each set are assumed to have the same internal structure (i.e. sets of keys). Returns new set of same type as
a
.join( new Set([ {id: 1, name: "foo"}, {id: 2, name: "bar"}, {id: 3, name: "baz"}]), new Set([ {id: 1, color: "red"}, {id: 2, color: "blue"}]) ) // Set { // { id: 1, color: 'red', name: 'foo' }, // { id: 2, color: 'blue', name: 'bar' } // }