1 | <?php |
||
32 | class SqlValueVisitor extends ExpressionVisitor |
||
33 | { |
||
34 | /** |
||
35 | * @var array |
||
36 | */ |
||
37 | private $values = []; |
||
38 | |||
39 | /** |
||
40 | * @var array |
||
41 | */ |
||
42 | private $types = []; |
||
43 | |||
44 | /** |
||
45 | * Converts a comparison expression into the target query language output. |
||
46 | * |
||
47 | * @param \Doctrine\Common\Collections\Expr\Comparison $comparison |
||
48 | * |
||
49 | * @return mixed |
||
50 | */ |
||
51 | 54 | public function walkComparison(Comparison $comparison) |
|
66 | |||
67 | /** |
||
68 | * Converts a composite expression into the target query language output. |
||
69 | * |
||
70 | * @param \Doctrine\Common\Collections\Expr\CompositeExpression $expr |
||
71 | * |
||
72 | * @return mixed |
||
73 | */ |
||
74 | 8 | public function walkCompositeExpression(CompositeExpression $expr) |
|
80 | |||
81 | /** |
||
82 | * Converts a value expression into the target query language part. |
||
83 | * |
||
84 | * @param \Doctrine\Common\Collections\Expr\Value $value |
||
85 | * |
||
86 | * @return mixed |
||
87 | */ |
||
88 | public function walkValue(Value $value) |
||
92 | |||
93 | /** |
||
94 | * Returns the Parameters and Types necessary for matching the last visited expression. |
||
95 | * |
||
96 | * @return array |
||
97 | */ |
||
98 | 54 | public function getParamsAndTypes() |
|
102 | |||
103 | /** |
||
104 | * Returns the value from a Comparison. In case of a CONTAINS comparison, |
||
105 | * the value is wrapped in %-signs, because it will be used in a LIKE clause. |
||
106 | * |
||
107 | * @param \Doctrine\Common\Collections\Expr\Comparison $comparison |
||
108 | * @return mixed |
||
109 | */ |
||
110 | 54 | protected function getValueFromComparison(Comparison $comparison) |
|
128 | } |
||
129 |