File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,9 @@ public function getTable(bool $withAlias = false): string
109109 */
110110 public function getColumns (): array
111111 {
112+ if (is_string ($ this ->columns )) {
113+ return explode (", " , $ this ->columns );
114+ }
112115 if (!is_null ($ this ->mig ) && !$ this ->mig ->columns ($ this ->columns )) {
113116 throw new DBValidationException ($ this ->mig ->getMessage (), 1 );
114117 }
Original file line number Diff line number Diff line change @@ -275,12 +275,28 @@ protected function showView(): self
275275 return $ this ;
276276 }
277277
278- public function columns (...$ columns )
278+ /**
279+ * Select protected mysql columns
280+ * @param string $columns
281+ * @return self
282+ */
283+ public function columns (...$ columns ): self
279284 {
280285 $ this ->columns = $ this ->prepArr ($ columns , false );
281286 return $ this ;
282287 }
283288
289+ /**
290+ * Select unprotected mysql columns
291+ * @param string $columns
292+ * @return self
293+ */
294+ public function columnsRaw (string $ columns ): self
295+ {
296+ $ this ->columns = $ columns ;
297+ return $ this ;
298+ }
299+
284300 /**
285301 * Change where compare operator from default "=".
286302 * Will change back to default after where method is triggered
You can’t perform that action at this time.
0 commit comments