Lines Matching refs:terms

499         $terms = array();
503 $terms[] = $this->_name($tp['subject']);
508 $terms[] = $this->_name($tp['predicate']);
513 $terms[] = $this->_name($tp['object']);
519 'terms'=>array_unique($terms)
527 // determine the resulting terms
528 $terms = array_unique(array_merge($gp1['terms'], $gp2['terms']));
530 // determine the overlapping terms (we need to coalesce these)
531 $common = array_intersect($gp1['terms'], $gp2['terms']);
533 // determine the non-overlapping terms (we can project them directly)
534 $fields = array_diff($terms, $common);
536 // handle overlapping terms by coalescing them into a single term
552 'terms'=>$terms
646 'terms'=>$gp['terms']
657 // determine overlapping terms (we need to substitute these)
658 $common = array_intersect($gp1['terms'], $gp2['terms']);
660 // create conditional that 'substitutes' terms by requiring equality
661 $terms = array();
663 $terms[] = '('.$this->_ci('r1.'.$c).' = '.$this->_ci('r2.'.$c).')';
666 if(count($terms)>0) {
667 $terms = implode(' AND ',$terms);
669 $terms = '1=1';
673 'sql'=>'SELECT DISTINCT * FROM ('.$gp1['sql'].') r1 WHERE NOT EXISTS (SELECT * FROM ('.$gp2['sql'].') r2 WHERE '.$terms.')',
674 'terms'=>$gp1['terms']
691 // determine non-overlapping terms
692 $ta = array_diff($gp1['terms'], $gp2['terms']);
693 $tb = array_diff($gp2['terms'], $gp1['terms']);
695 // determine overlapping terms
696 $tc = array_intersect($gp1['terms'], $gp2['terms']);
698 // determine final terms
699 $terms = array_unique(array_merge($gp1['terms'], $gp2['terms']));
705 // append common terms with renaming
716 'terms'=>$terms
729 $terms = array();
783 $terms[] = $name;
826 'terms'=>$terms
848 return array('sql'=>'<<INVALID QUERY NODE>>', 'terms'=>array());