本文整理汇总了PHP中Doctrine\ORM\Query\SqlWalker::walkArithmeticExpression方法的典型用法代码示例。如果您正苦于以下问题:PHP SqlWalker::walkArithmeticExpression方法的具体用法?PHP SqlWalker::walkArithmeticExpression怎么用?PHP SqlWalker::walkArithmeticExpression使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doctrine\ORM\Query\SqlWalker
的用法示例。
在下文中一共展示了SqlWalker::walkArithmeticExpression方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSql
public function getSql(SqlWalker $sqlWalker)
{
return 'DATE_FORMAT (' . $sqlWalker->walkArithmeticExpression($this->dateExpression) . ',' . $sqlWalker->walkStringPrimary($this->formatChar) . ')';
}
示例2: getSql
public function getSql(SqlWalker $sqlWalker)
{
return 'YEAR(' . $sqlWalker->walkArithmeticExpression($this->dateExpression) . ')';
}
示例3: getSql
/**
* getSql - allows ORM to inject a UNIX_TIMESTAMP() statement into an SQL
* string being constructed
*
* @param \Doctrine\ORM\Query\SqlWalker $sqlWalker
* @return void
*/
public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
{
return 'UNIX_TIMESTAMP(' . $sqlWalker->walkArithmeticExpression($this->_sDateExpression) . ')';
}
示例4: getSql
/**
* {@inheritdoc}
*/
public function getSql(SqlWalker $sqlWalker)
{
return sprintf('CONVERT_TZ(%s, %s, %s)', $sqlWalker->walkArithmeticExpression($this->dateExpression), $sqlWalker->walkStringPrimary($this->fromTz), $sqlWalker->walkStringPrimary($this->toTz));
}
示例5: getSql
/**
* getSql - allows ORM to inject a DATE_FORMAT() statement into an SQL string being constructed
*
* @param \Doctrine\ORM\Query\SqlWalker $sqlWalker
*
* @return void
*/
public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
{
$date = $sqlWalker->walkArithmeticExpression($this->dateExpression);
$format = $sqlWalker->walkStringPrimary($this->formatChar);
return sprintf('DATE_FORMAT(%s, %s)', $date, $format);
}
示例6: getSql
/**
* getSql - allows ORM to inject a DATE_FORMAT() statement into an SQL
* string being constructed
*
* @param \Doctrine\ORM\Query\SqlWalker $sqlWalker
* @return void
*/
public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
{
return 'DATE_FORMAT(' . $sqlWalker->walkArithmeticExpression($this->_sDateExpression) . ',' . $sqlWalker->walkStringPrimary($this->_sFormatChar) . ')';
}
示例7: getSql
public function getSql(SqlWalker $sqlWalker)
{
return 'TRUNCATE(' . $sqlWalker->walkArithmeticExpression($this->nb) . "," . $sqlWalker->walkArithmeticExpression($this->format) . ')';
}
示例8: getSql
public function getSql(SqlWalker $sqlWalker)
{
return 'ROUND(' . $sqlWalker->walkArithmeticExpression($this->nb) . ')';
}