1 | <?php namespace Anomaly\Streams\Platform\Model; |
||
17 | class EloquentQueryBuilder extends Builder |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * Runtime cache. |
||
22 | * |
||
23 | * @var array |
||
24 | */ |
||
25 | protected static $cache = []; |
||
26 | |||
27 | /** |
||
28 | * The model being queried. |
||
29 | * |
||
30 | * @var EloquentModel |
||
31 | */ |
||
32 | protected $model; |
||
33 | |||
34 | /** |
||
35 | * Execute the query as a "select" statement. |
||
36 | * |
||
37 | * @param array $columns |
||
38 | * @return \Illuminate\Database\Eloquent\Collection|static[] |
||
39 | */ |
||
40 | public function get($columns = ['*']) |
||
74 | |||
75 | /** |
||
76 | * Return if a table has been joined or not. |
||
77 | * |
||
78 | * @param $table |
||
79 | * @return bool |
||
80 | */ |
||
81 | public function hasJoin($table) |
||
96 | |||
97 | /** |
||
98 | * Remember and index. |
||
99 | * |
||
100 | * @return $this |
||
101 | */ |
||
102 | protected function rememberIndex() |
||
110 | |||
111 | /** |
||
112 | * Index cache collection |
||
113 | * |
||
114 | * @return object |
||
115 | */ |
||
116 | protected function indexCacheCollection() |
||
125 | |||
126 | /** |
||
127 | * Get the unique cache key for the query. |
||
128 | * |
||
129 | * @return string |
||
130 | */ |
||
131 | public function getCacheKey() |
||
137 | |||
138 | /** |
||
139 | * Set the model TTl. |
||
140 | * |
||
141 | * @param $ttl |
||
142 | * @return $this |
||
143 | */ |
||
144 | public function cache($ttl) |
||
150 | |||
151 | /** |
||
152 | * Get fresh models / disable cache |
||
153 | * |
||
154 | * @param boolean $fresh |
||
155 | * @return object |
||
156 | */ |
||
157 | public function fresh($fresh = true) |
||
165 | |||
166 | /** |
||
167 | * Update a record in the database. |
||
168 | * |
||
169 | * @param array $values |
||
170 | * @return int |
||
171 | */ |
||
172 | public function update(array $values) |
||
182 | |||
183 | /** |
||
184 | * Delete a record from the database. |
||
185 | * |
||
186 | * @return mixed |
||
187 | */ |
||
188 | public function delete() |
||
198 | |||
199 | /** |
||
200 | * Order by sort_order if null. |
||
201 | */ |
||
202 | protected function orderByDefault() |
||
243 | } |
||
244 |