コード例 #1
0
 /**
  * @param QOM\ChildNodeJoinConditionInterface $condition
  *
  * @return string
  */
 public function walkChildNodeJoinCondition(QOM\ChildNodeJoinConditionInterface $condition)
 {
     $rightAlias = $this->getTableAlias($condition->getChildSelectorName());
     $leftAlias = $this->getTableAlias($condition->getParentSelectorName());
     return "({$rightAlias}.path LIKE CONCAT({$leftAlias}.path, '/%') AND {$rightAlias}.depth = {$leftAlias}.depth + 1) ";
 }
コード例 #2
0
 /**
  * ChildNodeJoinCondition ::=
  *   'ISCHILDNODE(' childSelectorName ','
  *                  parentSelectorName ')'
  *   childSelectorName ::= selectorName
  *   parentSelectorName ::= selectorName
  *
  * @param  QOM\ChildNodeJoinConditionInterface $condition
  * @return string
  */
 protected function convertChildNodeJoinCondition(QOM\ChildNodeJoinConditionInterface $condition)
 {
     return $this->generator->evalChildNodeJoinCondition($condition->getChildSelectorName(), $condition->getParentSelectorName());
 }