![]() ![]() public function andX ($x = null) // Returns Expr\AndX instance // Example - $qb->expr()->orX($cond1 )->add(.)->. ![]() Example - $qb->addOrderBy('u.firstName') public function addOrderBy ($sort, $order = null) // Default $order = 'ASC'Įxpr()->andX($cond1 )->add(.)->. NOTE: -> orderBy() overrides all previously set ordering conditions // // Example - $qb->orderBy('u.surname', 'DESC') public function orderBy ($sort, $order = null) Example - $qb->orHaving($qb->expr()->lte('g.managerLevel', '100')) public function orHaving ($having) Example - $qb->andHaving($qb->expr()->gt($qb->expr()->count('u.numChild'), 0)) public function andHaving ($having) NOTE: -> having() overrides all previously set having conditions // // Example - $qb->having('u.salary >= ?1') // Example - $qb->having($qb->expr()->gte('u.salary', '?1')) public function having ($having) Example - $qb->addGroupBy('g.name') public function addGroupBy ($groupBy) NOTE: -> groupBy() overrides all previously set grouping conditions // // Example - $qb->groupBy('u.id') public function groupBy ($groupBy) Example - $qb->orWhere($qb->expr()->between('u.id', 1, 10)) public function orWhere ($where) NOTE: ->andWhere() can be used directly, without any ->where() before // // Example - $qb->andWhere($qb->expr()->orX($qb->expr()->lte('u.age', 40), 'u.numChild = 0')) public function andWhere ($where) Example - $qb->leftJoin('u.Phonenumbers', 'p', Expr\Join::WITH, $qb->expr()->eq('p.area_code', 55)) // Example - $qb->leftJoin('u.Phonenumbers', 'p', 'WITH', 'p.area_code = 55') // Example - $qb->leftJoin('u.Phonenumbers', 'p', 'WITH', 'p.area_code = 55', 'p.id') public function leftJoin ($join, $alias, $conditionType = null, $condition = null, $indexBy = null) Example - $qb->innerJoin('u.Group', 'g', Expr\Join::WITH, $qb->expr()->eq('u.status_id', '?1')) // Example - $qb->innerJoin('u.Group', 'g', 'WITH', 'u.status = ?1') // Example - $qb->innerJoin('u.Group', 'g', 'WITH', 'u.status = ?1', 'g.id') public function innerJoin ($join, $alias, $conditionType = null, $condition = null, $indexBy = null) Example - $qb->from('Phonenumber', 'p') // Example - $qb->from('Phonenumber', 'p', 'p.id') public function from ($from, $alias, $indexBy = null) Example - $qb->update('Group', 'g') public function update ($update = null, $alias = null) Example - $qb->delete('User', 'u') public function delete ($delete = null, $alias = null) addSelect does not override previous calls to select // // Example - $qb->select('u') // ->addSelect('p.area_code') public function addSelect ($select = null) Select('u') // Example - $qb->select(array('u', 'p')) // Example - $qb->select($qb->expr()->select('u', 'p')) public function select ($select = null) ![]()
0 Comments
Leave a Reply. |