Insert the join key `(left = right)` into the set if join pair `(right = left)` is not already in the set returns true if the pair was inserted
(&mut self, left: &Expr, right: &Expr)
| 58 | /// |
| 59 | /// returns true if the pair was inserted |
| 60 | pub fn insert(&mut self, left: &Expr, right: &Expr) -> bool { |
| 61 | if self.contains(left, right) { |
| 62 | false |
| 63 | } else { |
| 64 | self.inner.insert((left.clone(), right.clone())); |
| 65 | true |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | /// Same as [`Self::insert`] but avoids cloning expression if they |
| 70 | /// are owned |