本文整理匯總了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) . ')';
}