stub of the row editor
This commit is contained in:
@@ -40,12 +40,12 @@ class Revision extends BaseModel
|
||||
* @param Column[] $columns
|
||||
* @return \Illuminate\Database\Query\Builder|static
|
||||
*/
|
||||
public function rowsData($columns, $withId=true)
|
||||
public function rowsData($columns, $withId=true, $named=true)
|
||||
{
|
||||
$selects = $withId ? ["data->>'_id' as _id"] : [];
|
||||
|
||||
foreach ($columns as $col) {
|
||||
$selects[] = "data->>'$col->id' as $col->name";
|
||||
$selects[] = "data->>'$col->id' as " . ($named ? $col->name : $col->id);
|
||||
}
|
||||
|
||||
return $this->rows()->select([])->selectRaw(implode(', ', $selects));
|
||||
|
||||
Reference in New Issue
Block a user