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


PHP SqlWalker::walkSimpleArithmeticExpression方法代码示例

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


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

示例1: 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

示例2: getSql

 public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
 {
     $secondArgument = '';
     if ($this->optionalSecondExpression) {
         $secondArgument = $sqlWalker->walkSimpleArithmeticExpression($this->optionalSecondExpression);
     }
     return 'ATAN(' . $sqlWalker->walkSimpleArithmeticExpression($this->arithmeticExpression) . ($secondArgument ? ', ' . $secondArgument : '') . ')';
 }
开发者ID:uppaljs,项目名称:pakistan-vlmis-v2,代码行数:8,代码来源:Atan.php

示例3: 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

示例4: getSql

 /**
  * {@inheritdoc}
  */
 public function getSql(SqlWalker $sqlWalker)
 {
     // This type is defined by ANSI SQL
     $targetType = 'VARCHAR';
     // MySQL needs a CHAR type for string conversion (http://dev.mysql.com/doc/refman/5.7/en/type-conversion.html)
     if ($sqlWalker->getConnection()->getDatabasePlatform()->getName() === 'mysql') {
         $targetType = 'CHAR';
     }
     return 'CAST(' . $sqlWalker->walkSimpleArithmeticExpression($this->stringPrimary) . ' AS ' . $targetType . ')';
 }
开发者ID:robertlemke,项目名称:neos-development-collection,代码行数:13,代码来源:ToStringFunction.php

示例5: getSql

 /**
  * @override
  */
 public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
 {
     return $sqlWalker->getConnection()->getDatabasePlatform()->getLocateExpression($sqlWalker->walkStringPrimary($this->secondStringPrimary), $sqlWalker->walkStringPrimary($this->firstStringPrimary), $this->simpleArithmeticExpression ? $sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression) : false);
 }
开发者ID:krishcdbry,项目名称:z-zangura,代码行数:7,代码来源:LocateFunction.php

示例6: getSql

 /**
  * @override
  */
 public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
 {
     return 'MONTH(' . $sqlWalker->walkSimpleArithmeticExpression($this->simpleDate) . ')';
 }
开发者ID:defan-marunchak,项目名称:eurotax,代码行数:7,代码来源:MonthFunction.php

示例7: getSql

 /**
  * @override
  */
 public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
 {
     //TODO: Use platform to get SQL
     return 'SQRT(' . $sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression) . ')';
 }
开发者ID:pabloasc,项目名称:test_social,代码行数:8,代码来源:SqrtFunction.php

示例8: getSql

 public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
 {
     $firstArgument = $sqlWalker->walkSimpleArithmeticExpression($this->firstExpression);
     $secondArgument = $sqlWalker->walkSimpleArithmeticExpression($this->secondExpression);
     return 'ATAN2(' . $firstArgument . ', ' . $secondArgument . ')';
 }
开发者ID:pabloasc,项目名称:test_social,代码行数:6,代码来源:Atan2.php

示例9: getSql

 public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
 {
     return 'ASIN(' . $sqlWalker->walkSimpleArithmeticExpression($this->arithmeticExpression) . ')';
 }
开发者ID:uppaljs,项目名称:pakistan-vlmis-v2,代码行数:4,代码来源:Asin.php

示例10: getSql

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

示例11: getSql

 public function getSql(SqlWalker $sqlWalker)
 {
     return sprintf('VARIANCE(%s)', $sqlWalker->walkSimpleArithmeticExpression($this->arithmeticExpression));
 }
开发者ID:beberlei,项目名称:doctrineextensions,代码行数:4,代码来源:Variance.php

示例12: getSql

 /**
  * @override
  */
 public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
 {
     //TODO: Use platform to get SQL
     return 'LOCATE(' . $sqlWalker->walkStringPrimary($this->firstStringPrimary) . ', ' . $sqlWalker->walkStringPrimary($this->secondStringPrimary) . ($this->simpleArithmeticExpression ? ', ' . $sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression) : '') . ')';
 }
开发者ID:nvdnkpr,项目名称:symfony-demo,代码行数:8,代码来源:LocateFunction.php

示例13: getSql

 public function getSql(SqlWalker $sqlWalker)
 {
     return 'RAND(' . $sqlWalker->walkSimpleArithmeticExpression($this->value) . ')';
 }
开发者ID:iakumai,项目名称:doctrine-functions,代码行数:4,代码来源:Randp.php

示例14: getSql

 /**
  * @override
  */
 public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
 {
     return 'SHA2(' . $sqlWalker->walkStringPrimary($this->stringPrimary) . ',' . $sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression) . ')';
 }
开发者ID:matiasraies,项目名称:Symfony2Inta,代码行数:7,代码来源:Sha2.php

示例15: getSql

 /**
  * Get SQL
  *
  * @param \Doctrine\ORM\Query\SqlWalker $sqlWalker
  * @return string
  */
 public function getSql(SqlWalker $sqlWalker)
 {
     return 'RADIANS(' . $sqlWalker->walkSimpleArithmeticExpression($this->arithmeticExpression) . ')';
 }
开发者ID:geoffreytran,项目名称:zym,代码行数:10,代码来源:RadiansFunction.php


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