unionMembers
Unifies records from two queries.
queryLogic.unionMembers(queryA, queryB, aRecords, bRecords)
Unifies records from queryA
and queryB
into a single array of records.
import {QueryLogic} from "can";
const queryLogic = new QueryLogic({
identity: ["id"]
});
const ids = queryLogic.unionMembers(
{page: {start: 1, end: 2} },
{page: {start: 2, end: 4} },
[{id: 1},{id: 2}],
[{id: 2},{id: 3},{id: 4}]
);
console.log( ids ); //-> [{id: 1},{id: 2},{id: 3},{id: 4}]
Parameters
Returns
{Array<Object>}
:
Returns records in both set a
and set b
.