Expr
public class Expr
www.doctrine-project.org
Method Summary | |
---|---|
Expr\Func | abs(mixed x) Creates an ABS() function expression with the given argument. |
Expr\Func | all(mixed subquery) Creates an instance of ALL() function, with the given DQL Subquery. |
Expr\Andx | andX(mixed x) Creates a conjunction of the given boolean expressions. |
Expr\Func | any(mixed subquery) Creates an ANY() function expression with the given DQL subquery. |
OrderBy | asc(mixed expr, $sort ) Creates an ASCending order expression. |
Expr\Func | avg(mixed x) Creates an instance of AVG() function, with the given argument. |
Expr\Func | between(mixed val, integer x, integer y) Creates an instance of BETWEEN() function, with the given argument. |
Expr\Func | concat(mixed x, mixed y) Creates a CONCAT() function expression with the given arguments. |
Expr\Func | count(mixed x) Creates an instance of COUNT() function, with the given argument. |
string | countDistinct(mixed x) Creates an instance of COUNT(DISTINCT) function, with the given argument. |
OrderBy | desc(mixed expr, $sort ) Creates a DESCending order expression. |
Expr\Math | diff(mixed x, mixed y) Creates a difference mathematical expression with the given arguments. |
Expr\Comparison | eq(mixed x, mixed y) Creates an equality comparison expression with the given arguments. |
Expr\Func | exists(mixed subquery) Creates an instance of EXISTS() function, with the given DQL Subquery. |
Expr\Comparison | gt(mixed x, mixed y) Creates an instance of Expr\Comparison, with the given arguments. |
Expr\Comparison | gte(mixed x, mixed y) Creates an instance of Expr\Comparison, with the given arguments. |
Expr\Func | in(string x, mixed y) Creates an IN() expression with the given arguments. |
Expr\Func | length(mixed x) Creates a LENGTH() function expression with the given argument. |
Expr\Comparison | like(string x, mixed y) Creates a LIKE() comparison expression with the given arguments. |
Expr\Literal | literal(mixed literal) Creates a literal expression of the given argument. |
Expr\Func | lower(mixed x) Creates a LOWER() function expression with the given argument. |
Expr\Comparison | lt(mixed x, mixed y) Creates an instance of Expr\Comparison, with the given arguments. |
Expr\Comparison | lte(mixed x, mixed y) Creates an instance of Expr\Comparison, with the given arguments. |
Expr\Func | max(mixed x) Creates an instance of MAX() function, with the given argument. |
Expr\Func | min(mixed x) Creates an instance of MIN() function, with the given argument. |
Expr\Comparison | neq(mixed x, mixed y) Creates an instance of Expr\Comparison, with the given arguments. |
Expr\Func | not(mixed restriction) Creates a negation expression of the given restriction. |
Expr\Func | notIn(string x, mixed y) Creates a NOT IN() expression with the given arguments. |
Expr\Orx | orX(mixed x) Creates a disjunction of the given boolean expressions. |
Expr\Math | prod(mixed x, mixed y) Creates a product mathematical expression with the given arguments. |
Expr\Math | quot(mixed x, mixed y) Creates a quotient mathematical expression with the given arguments. |
Expr\Func | some(mixed subquery) Creates a SOME() function expression with the given DQL subquery. |
Expr\Func | sqrt(mixed x) Creates a SQRT() function expression with the given argument. |
Expr\Func | substring(mixed x, integer from, integer len) Creates a SUBSTRING() function expression with the given arguments. |
Expr\Math | sum(mixed x, mixed y) Creates a sum mathematical expression with the given arguments. |
Expr\Func | trim(mixed x) Creates an instance of TRIM() function, with the given argument. |
Expr\Func | upper(mixed x) Creates an UPPER() function expression with the given argument. |
public Expr\Func abs(mixed x)
Creates an ABS() function expression with the given argument.
public Expr\Func all(mixed subquery)
Creates an instance of ALL() function, with the given DQL Subquery.
public Expr\Andx andX(mixed x)
Creates a conjunction of the given boolean expressions.
Example:
[php] (u.type = ?1) AND (u.role = ?2) $expr->andX('u.type = ?1', 'u.role = ?2'));
public Expr\Func any(mixed subquery)
Creates an ANY() function expression with the given DQL subquery.
public OrderBy asc(mixed expr, $sort )
Creates an ASCending order expression.
public Expr\Func avg(mixed x)
Creates an instance of AVG() function, with the given argument.
public Expr\Func between(mixed val, integer x, integer y)
Creates an instance of BETWEEN() function, with the given argument.
public Expr\Func concat(mixed x, mixed y)
Creates a CONCAT() function expression with the given arguments.
public Expr\Func count(mixed x)
Creates an instance of COUNT() function, with the given argument.
public string countDistinct(mixed x)
Creates an instance of COUNT(DISTINCT) function, with the given argument.
public OrderBy desc(mixed expr, $sort )
Creates a DESCending order expression.
public Expr\Math diff(mixed x, mixed y)
Creates a difference mathematical expression with the given arguments.
First argument is considered the left expression and the second is the right expression.
When converted to string, it will generated a
[php] u.monthlySubscriptionCount - 1 $q->expr()->diff('u.monthlySubscriptionCount', '1')
public Expr\Comparison eq(mixed x, mixed y)
Creates an equality comparison expression with the given arguments.
First argument is considered the left expression and the second is the right expression.
When converted to string, it will generated a
[php] u.id = ?1 $expr->eq('u.id', '?1');
public Expr\Func exists(mixed subquery)
Creates an instance of EXISTS() function, with the given DQL Subquery.
public Expr\Comparison gt(mixed x, mixed y)
Creates an instance of Expr\Comparison, with the given arguments.
First argument is considered the left expression and the second is the right expression.
When converted to string, it will generated a
[php] u.id > ?1 $q->where($q->expr()->gt('u.id', '?1'));
public Expr\Comparison gte(mixed x, mixed y)
Creates an instance of Expr\Comparison, with the given arguments.
First argument is considered the left expression and the second is the right expression.
When converted to string, it will generated a
[php] u.id >= ?1 $q->where($q->expr()->gte('u.id', '?1'));
public Expr\Func in(string x, mixed y)
Creates an IN() expression with the given arguments.
public Expr\Func length(mixed x)
Creates a LENGTH() function expression with the given argument.
public Expr\Comparison like(string x, mixed y)
Creates a LIKE() comparison expression with the given arguments.
public Expr\Literal literal(mixed literal)
Creates a literal expression of the given argument.
public Expr\Func lower(mixed x)
Creates a LOWER() function expression with the given argument.
public Expr\Comparison lt(mixed x, mixed y)
Creates an instance of Expr\Comparison, with the given arguments.
First argument is considered the left expression and the second is the right expression.
When converted to string, it will generated a
[php] u.id < ?1 $q->where($q->expr()->lt('u.id', '?1'));
public Expr\Comparison lte(mixed x, mixed y)
Creates an instance of Expr\Comparison, with the given arguments.
First argument is considered the left expression and the second is the right expression.
When converted to string, it will generated a
[php] u.id <= ?1 $q->where($q->expr()->lte('u.id', '?1'));
public Expr\Func max(mixed x)
Creates an instance of MAX() function, with the given argument.
public Expr\Func min(mixed x)
Creates an instance of MIN() function, with the given argument.
public Expr\Comparison neq(mixed x, mixed y)
Creates an instance of Expr\Comparison, with the given arguments.
First argument is considered the left expression and the second is the right expression.
When converted to string, it will generated a
[php] u.id <> ?1 $q->where($q->expr()->neq('u.id', '?1'));
public Expr\Func not(mixed restriction)
Creates a negation expression of the given restriction.
public Expr\Func notIn(string x, mixed y)
Creates a NOT IN() expression with the given arguments.
public Expr\Orx orX(mixed x)
Creates a disjunction of the given boolean expressions.
Example:
[php] (u.type = ?1) OR (u.role = ?2) $q->where($q->expr()->orX('u.type = ?1', 'u.role = ?2'));
public Expr\Math prod(mixed x, mixed y)
Creates a product mathematical expression with the given arguments.
First argument is considered the left expression and the second is the right expression.
When converted to string, it will generated a
[php] u.salary * u.percentAnualSalaryIncrease $q->expr()->prod('u.salary', 'u.percentAnualSalaryIncrease')
public Expr\Math quot(mixed x, mixed y)
Creates a quotient mathematical expression with the given arguments.
First argument is considered the left expression and the second is the right expression.
When converted to string, it will generated a
[php] u.total / u.period $expr->quot('u.total', 'u.period')
public Expr\Func some(mixed subquery)
Creates a SOME() function expression with the given DQL subquery.
public Expr\Func sqrt(mixed x)
Creates a SQRT() function expression with the given argument.
public Expr\Func substring(mixed x, integer from, integer len)
Creates a SUBSTRING() function expression with the given arguments.
public Expr\Math sum(mixed x, mixed y)
Creates a sum mathematical expression with the given arguments.
First argument is considered the left expression and the second is the right expression.
When converted to string, it will generated a
[php] u.numChildren + 1 $q->expr()->diff('u.numChildren', '1')
public Expr\Func trim(mixed x)
Creates an instance of TRIM() function, with the given argument.
public Expr\Func upper(mixed x)
Creates an UPPER() function expression with the given argument.
This class is used to generate DQL expressions via a set of PHP static functions