Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 677 Bytes

File metadata and controls

32 lines (24 loc) · 677 Bytes
layout language permalink command related_commands
api-command
Java
api/java/set_difference/
setDifference
difference setInsert setUnion setDifference union
difference/
set_insert/
set_union/
set_difference/
union/

Command syntax

{% apibody %} array.setDifference(array) → array {% endapibody %}

Description

Remove the elements of one array from another and return them as a set (an array with distinct values).

Example: Check which pieces of equipment Iron Man has, excluding a fixed list.

r.table("marvel").get("IronMan").g("equipment")
 .setDifference(r.array("newBoots", "arc_reactor")).run(conn);