當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Connection::getExpressionBuilder方法代碼示例

本文整理匯總了PHP中Doctrine\DBAL\Connection::getExpressionBuilder方法的典型用法代碼示例。如果您正苦於以下問題:PHP Connection::getExpressionBuilder方法的具體用法?PHP Connection::getExpressionBuilder怎麽用?PHP Connection::getExpressionBuilder使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Doctrine\DBAL\Connection的用法示例。


在下文中一共展示了Connection::getExpressionBuilder方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * Construtor
  *
  * @param Connection $connection
  * @param array $rootAliases
  * @param array $fieldMap
  */
 public function __construct(Connection $connection, array $rootAliases, array $fieldMap = array())
 {
     $this->rootAliases = $rootAliases;
     $this->fieldMap = $fieldMap;
     $this->conn = $connection;
     $this->expr = $this->conn->getExpressionBuilder();
 }
開發者ID:brodaproject,項目名稱:broda,代碼行數:14,代碼來源:DbalQueryExpressionVisitor.php

示例2: expr

 /**
  * Gets an ExpressionBuilder used for object-oriented construction of query expressions.
  * This producer method is intended for convenient inline usage. Example:
  *
  * <code>
  *     $qb = $conn->createQueryBuilder()
  *         ->select('u')
  *         ->from('users', 'u')
  *         ->where($qb->expr()->eq('u.id', 1));
  * </code>
  *
  * For more complex expression construction, consider storing the expression
  * builder object in a local variable.
  *
  * @return \Doctrine\DBAL\Query\Expression\ExpressionBuilder
  */
 public function expr()
 {
     return $this->connection->getExpressionBuilder();
 }
開發者ID:betes-curieuses-design,項目名稱:ElieJosiePhotographie,代碼行數:20,代碼來源:QueryBuilder.php

示例3: getExpressionBuilder

 /**
  * Gets the ExpressionBuilder for the connection.
  *
  * @return \Doctrine\DBAL\Query\Expression\ExpressionBuilder
  * @deprecated please use $this->getQueryBuilder()->expr() instead
  */
 public function getExpressionBuilder()
 {
     $backtrace = $this->getCallerBacktrace();
     \OC::$server->getLogger()->debug('Doctrine ExpressionBuilder retrieved in {backtrace}', ['app' => 'core', 'backtrace' => $backtrace]);
     return parent::getExpressionBuilder();
 }
開發者ID:reverserob,項目名稱:core,代碼行數:12,代碼來源:connection.php

示例4: expr

 /**
  * Alias for <code>$this->getDatabase()->getExpressionBuilder()</code>.
  *
  * @final
  *
  * @return \Doctrine\DBAL\Query\Expression\ExpressionBuilder
  */
 protected final function expr()
 {
     return $this->db->getExpressionBuilder();
 }
開發者ID:lokhman,項目名稱:silex-arm,代碼行數:11,代碼來源:Repository.php


注:本文中的Doctrine\DBAL\Connection::getExpressionBuilder方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。