Gets the ExpressionBuilder for the connection.
public getExpressionBuilder ( ) : Doctrine\DBAL\Query\Expression\ExpressionBuilder | ||
return | Doctrine\DBAL\Query\Expression\ExpressionBuilder |
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * Alias for <code>$this->getDatabase()->getExpressionBuilder()</code>. * * @final * * @return \Doctrine\DBAL\Query\Expression\ExpressionBuilder */ protected final function expr() { return $this->db->getExpressionBuilder(); }