當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。