当前位置: 首页>>代码示例>>PHP>>正文


PHP SqlWalker::walkStringPrimary方法代码示例

本文整理汇总了PHP中Doctrine\ORM\Query\SqlWalker::walkStringPrimary方法的典型用法代码示例。如果您正苦于以下问题:PHP SqlWalker::walkStringPrimary方法的具体用法?PHP SqlWalker::walkStringPrimary怎么用?PHP SqlWalker::walkStringPrimary使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Doctrine\ORM\Query\SqlWalker的用法示例。


在下文中一共展示了SqlWalker::walkStringPrimary方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getSql

 /**
  * @override
  */
 public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
 {
     $platform = $sqlWalker->getConnection()->getDatabasePlatform();
     if (!method_exists($platform, 'getTranslateExpression')) {
         return $sqlWalker->walkStringPrimary($this->firstStringPrimary);
     }
     return $platform->getTranslateExpression($sqlWalker->walkStringPrimary($this->firstStringPrimary), $sqlWalker->walkStringPrimary($this->stringFrom), $sqlWalker->walkStringPrimary($this->stringTo));
 }
开发者ID:sgdoc,项目名称:sgdoce-codigo,代码行数:11,代码来源:TranslateFunction.php

示例2: getSql

 /**
  * @override
  */
 public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
 {
     $platform = $sqlWalker->getConnection()->getDatabasePlatform();
     if (!method_exists($platform, 'getStringAgg')) {
         return $sqlWalker->walkStringPrimary($this->firstStringPrimary);
     }
     return $platform->getStringAgg($sqlWalker->walkStringPrimary($this->firstStringPrimary), $sqlWalker->walkStringPrimary($this->secondStringPrimary));
 }
开发者ID:sgdoc,项目名称:sgdoce-codigo,代码行数:11,代码来源:StringAggFunction.php

示例3: getSql

 /**
  * {@inheritdoc}
  */
 public function getSql(SqlWalker $sqlWalker)
 {
     $strings = array();
     $stringExpressions = $this->parameters[Base::STRINGS_KEY];
     foreach ($stringExpressions as $stringExp) {
         $strings[] = $sqlWalker->walkStringPrimary($stringExp);
     }
     return sprintf('CONCAT_WS(%s, %s)', $sqlWalker->walkStringPrimary($this->parameters[Base::SEPARATOR_KEY]), implode(', ', $strings));
 }
开发者ID:Hikariii,项目名称:doctrine-extensions,代码行数:12,代码来源:ConcatWs.php

示例4: getSql

 /**
  * @override
  */
 public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
 {
     //TODO: Use platform to get SQL
     $sql = 'LOCATE(' . $sqlWalker->walkStringPrimary($this->_firstStringPrimary) . ', ' . $sqlWalker->walkStringPrimary($this->_secondStringPrimary);
     if ($this->_simpleArithmeticExpression) {
         $sql .= ', ' . $sqlWalker->walkSimpleArithmeticExpression($this->_simpleArithmeticExpression);
     }
     return $sql . ')';
 }
开发者ID:jackbravo,项目名称:doctrine,代码行数:12,代码来源:LocateFunction.php

示例5: getSql

 /**
  * {@inheritdoc}
  */
 public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
 {
     $strings = array();
     $stringExpressions = $this->parameters['strings'];
     foreach ($stringExpressions as $stringExp) {
         $strings[] = $sqlWalker->walkStringPrimary($stringExp);
     }
     return sprintf('CONCAT_WS(%s, %s)', $sqlWalker->walkStringPrimary($this->parameters['separator']), implode(', ', $strings));
 }
开发者ID:m3uzz,项目名称:onionfw,代码行数:12,代码来源:ConcatWs.php

示例6: getSql

 /**
  * @override
  */
 public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
 {
     $platform = $sqlWalker->getConnection()->getDatabasePlatform();
     return $platform->getConcatExpression($sqlWalker->walkStringPrimary($this->_firstStringPrimary), $sqlWalker->walkStringPrimary($this->_secondStringPrimary));
     /*
             $sql = 'CONCAT(' .
                     $sqlWalker->walkStringPrimary($this->_firstStringPrimary)
                     . ', ' .
                     $sqlWalker->walkStringPrimary($this->_secondStringPrimary)
                     . ')';
             return $sql;*/
 }
开发者ID:jackbravo,项目名称:doctrine,代码行数:15,代码来源:ConcatFunction.php

示例7: getSql

 /**
  * @override
  */
 public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
 {
     $platform = $sqlWalker->getConnection()->getDatabasePlatform();
     $strings = array_map(function ($v) use($sqlWalker) {
         return $sqlWalker->walkStringPrimary($v);
     }, $this->strings);
     return call_user_func_array(array($platform, 'getConcatExpression'), $strings);
 }
开发者ID:saberyounis,项目名称:Sonata-Project,代码行数:11,代码来源:MultiConcatFunction.php

示例8: getSql

 /**
  * {@inheritdoc}
  */
 public function getSql(SqlWalker $sqlWalker)
 {
     $stringPrimary = $sqlWalker->walkStringPrimary($this->stringPrimary);
     $platform = $sqlWalker->getConnection()->getDatabasePlatform();
     $trimMode = $this->getTrimMode();
     $trimChar = $this->trimChar !== false ? $sqlWalker->getConnection()->quote($this->trimChar) : false;
     return $platform->getTrimExpression($stringPrimary, $trimMode, $trimChar);
 }
开发者ID:Dren-x,项目名称:mobit,代码行数:11,代码来源:TrimFunction.php

示例9: getSql

 /**
  * @param SqlWalker $sqlWalker
  * @return string
  */
 public function getSql(SqlWalker $sqlWalker)
 {
     $args = array();
     foreach ($this->concatExpressions as $expression) {
         $args[] = $sqlWalker->walkStringPrimary($expression);
     }
     return 'CONCAT_WS(' . join(', ', (array) $args) . ')';
 }
开发者ID:glauberkyves,项目名称:mysql-functions-doctrine2,代码行数:12,代码来源:MysqlConcatWs.php

示例10: getSql

 /**
  * @override
  */
 public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
 {
     $optionalSecondSimpleArithmeticExpression = null;
     if ($this->secondSimpleArithmeticExpression !== null) {
         $optionalSecondSimpleArithmeticExpression = $sqlWalker->walkSimpleArithmeticExpression($this->secondSimpleArithmeticExpression);
     }
     return $sqlWalker->getConnection()->getDatabasePlatform()->getSubstringExpression($sqlWalker->walkStringPrimary($this->stringPrimary), $sqlWalker->walkSimpleArithmeticExpression($this->firstSimpleArithmeticExpression), $optionalSecondSimpleArithmeticExpression);
 }
开发者ID:yamildiego,项目名称:JY,代码行数:11,代码来源:SubstringFunction.php

示例11: getSql

 /**
  * @override
  */
 public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
 {
     $platform = $sqlWalker->getConnection()->getDatabasePlatform();
     $args = array();
     foreach ($this->concatExpressions as $expression) {
         $args[] = $sqlWalker->walkStringPrimary($expression);
     }
     return call_user_func_array(array($platform, 'getConcatExpression'), $args);
 }
开发者ID:alfredocoj,项目名称:blogzf2tutorial,代码行数:12,代码来源:ConcatFunction.php

示例12: getSql

 /**
  * @override
  */
 public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
 {
     $pos = AbstractPlatform::TRIM_UNSPECIFIED;
     if ($this->leading) {
         $pos = AbstractPlatform::TRIM_LEADING;
     } else {
         if ($this->trailing) {
             $pos = AbstractPlatform::TRIM_TRAILING;
         } else {
             if ($this->both) {
                 $pos = AbstractPlatform::TRIM_BOTH;
             }
         }
     }
     return $sqlWalker->getConnection()->getDatabasePlatform()->getTrimExpression($sqlWalker->walkStringPrimary($this->stringPrimary), $pos, $this->trimChar != false ? $sqlWalker->getConnection()->quote($this->trimChar) : false);
 }
开发者ID:manish436,项目名称:zform,代码行数:19,代码来源:TrimFunction.php

示例13: getSql

 /**
  * @override
  */
 public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
 {
     $sql = 'TRIM(';
     if ($this->leading) {
         $sql .= 'LEADING ';
     } else {
         if ($this->trailing) {
             $sql .= 'TRAILING ';
         } else {
             if ($this->both) {
                 $sql .= 'BOTH ';
             }
         }
     }
     if ($this->trimChar) {
         $sql .= $sqlWalker->getConnection()->quote($this->trimChar) . ' ';
     }
     return $sql . 'FROM ' . $sqlWalker->walkStringPrimary($this->stringPrimary) . ')';
 }
开发者ID:nvdnkpr,项目名称:symfony-demo,代码行数:22,代码来源:TrimFunction.php

示例14: getSql

 /**
  * @override
  */
 public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
 {
     $sql = 'TRIM(';
     if ($this->_leading) {
         $sql .= 'LEADING ';
     } else {
         if ($this->_trailing) {
             $sql .= 'TRAILING ';
         } else {
             if ($this->_both) {
                 $sql .= 'BOTH ';
             }
         }
     }
     if ($this->_trimChar) {
         $sql .= $this->_trimChar . ' ';
     }
     //TODO: quote()
     $sql .= 'FROM ' . $sqlWalker->walkStringPrimary($this->_stringPrimary);
     $sql .= ')';
     return $sql;
 }
开发者ID:jackbravo,项目名称:doctrine,代码行数:25,代码来源:TrimFunction.php

示例15: getSql

 public function getSql(SqlWalker $sqlWalker)
 {
     return 'INET_ATON(' . $sqlWalker->walkStringPrimary($this->ip) . ')';
 }
开发者ID:CERTUNLP,项目名称:NgenBundle,代码行数:4,代码来源:InetAtonFunction.php


注:本文中的Doctrine\ORM\Query\SqlWalker::walkStringPrimary方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。