Ejemplo n.º 1
0
 private function walkFullTextSearchConstraint(QOM\FullTextSearchInterface $constraint)
 {
     $selectorName = $constraint->getSelectorName();
     $propertyName = $constraint->getPropertyName();
     $fullTextSearch = $constraint->getFullTextSearchExpression();
     return sprintf('%s:%s', $this->escape($propertyName), $fullTextSearch);
 }
 /**
  * @param QOM\FullTextSearchInterface $constraint
  *
  * @return string
  */
 public function walkFullTextSearchConstraint(QOM\FullTextSearchInterface $constraint)
 {
     return $this->sqlXpathExtractValue($this->getTableAlias($constraint->getSelectorName()), $constraint->getPropertyName()) . ' LIKE ' . $this->conn->quote('%' . $constraint->getFullTextSearchExpression() . '%');
 }
 /**
  * FullTextSearch ::=
  *       'CONTAINS(' ([selectorName'.']propertyName |
  *                    selectorName'.*') ','
  *                    FullTextSearchExpression ')'
  *                      // If only one selector exists in this query,
  *                         explicit specification of the selectorName
  *                         preceding the propertyName is optional
  *
  * @param  QOM\FullTextSearchInterface $constraint
  * @return string
  */
 protected function convertFullTextSearch(QOM\FullTextSearchInterface $constraint)
 {
     $searchExpression = $this->convertFullTextSearchExpression($constraint->getFullTextSearchExpression());
     return $this->generator->evalFullTextSearch($constraint->getSelectorName(), $searchExpression, $constraint->getPropertyName());
 }