@@ -30,11 +30,11 @@ |
||
30 | 30 | return $this->limit; |
31 | 31 | } |
32 | 32 | |
33 | - /** |
|
34 | - * Get the grammar specific operators. |
|
35 | - * |
|
36 | - * @return array |
|
37 | - */ |
|
33 | + /** |
|
34 | + * Get the grammar specific operators. |
|
35 | + * |
|
36 | + * @return array |
|
37 | + */ |
|
38 | 38 | public function getOperators() |
39 | 39 | { |
40 | 40 | return $this->operators; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | switch (DB::$config[$connection]['driver']) { |
27 | 27 | case "dynamedb": |
28 | 28 | $this->grammar = new DynamoDBGrammar(); |
29 | - break; |
|
29 | + break; |
|
30 | 30 | default: |
31 | 31 | throw new Exception("bad driver"); |
32 | 32 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | if (is_array($column)) { |
90 | 90 | // 递归 |
91 | 91 | foreach ($column as $key => $value) { |
92 | - if (is_numeric($key) && is_array($value)) { |
|
92 | + if (is_numeric($key) && is_array($value)) { |
|
93 | 93 | $this->where(...array_values($value)); |
94 | 94 | } else { |
95 | 95 | $this->where($key, '=', $value, $boolean); |
@@ -127,12 +127,12 @@ discard block |
||
127 | 127 | } |
128 | 128 | |
129 | 129 | |
130 | - /** |
|
131 | - * Determine if the given operator is supported. |
|
132 | - * |
|
133 | - * @param string $operator |
|
134 | - * @return bool |
|
135 | - */ |
|
130 | + /** |
|
131 | + * Determine if the given operator is supported. |
|
132 | + * |
|
133 | + * @param string $operator |
|
134 | + * @return bool |
|
135 | + */ |
|
136 | 136 | protected function invalidOperator($operator) |
137 | 137 | { |
138 | 138 | return ! in_array(strtolower($operator), $this->operators, true) && |
@@ -199,24 +199,24 @@ discard block |
||
199 | 199 | return $this; |
200 | 200 | } |
201 | 201 | |
202 | - /** |
|
203 | - * Set the limit and offset for a given page. |
|
204 | - * |
|
205 | - * @param int $page |
|
206 | - * @param int $perPage |
|
207 | - * @return \Illuminate\Database\Query\Builder|static |
|
208 | - */ |
|
202 | + /** |
|
203 | + * Set the limit and offset for a given page. |
|
204 | + * |
|
205 | + * @param int $page |
|
206 | + * @param int $perPage |
|
207 | + * @return \Illuminate\Database\Query\Builder|static |
|
208 | + */ |
|
209 | 209 | public function forPage($page, $perPage = 15) |
210 | 210 | { |
211 | 211 | return $this->skip(($page - 1) * $perPage)->take($perPage); |
212 | 212 | } |
213 | 213 | |
214 | 214 | |
215 | - /** |
|
216 | - * Get the SQL representation of the query. |
|
217 | - * |
|
218 | - * @return string |
|
219 | - */ |
|
215 | + /** |
|
216 | + * Get the SQL representation of the query. |
|
217 | + * |
|
218 | + * @return string |
|
219 | + */ |
|
220 | 220 | public function toSql() |
221 | 221 | { |
222 | 222 | return $this->grammar->compileSelect($this); |