src/Context/SQLHandler.php
protected function getTableColumns($entity)
    {
        $columnClause = [];

        // Get all columns for insertion
        $allColumns = array_merge($this->requiredTableColumns($entity), $this->columns);

        // Set values for columns
        foreach ($allColumns as $col => $type) {
            $columnClause[$col] = isset($this->columns[$col]) ?
                $this->quoteOrNot($this->columns[$col]) :
                $this->sampleData($type);
        }

        $columnNames = implode(', ', array_keys($columnClause));
        $columnValues = implode(', ', $columnClause);

        return [$columnNames, $columnValues];
    }
protected function getTableColumns($entity)
    {
        $columnClause = [];

        // Get all columns for insertion
        $allColumns = array_merge($this->requiredTableColumns($entity), $this->columns);

        // Set values for columns
        foreach ($allColumns as $col => $type) {
            $columnClause[$col] = isset($this->columns[$col]) ?
                $this->quoteOrNot($this->columns[$col]) :
                $this->sampleData($type);
        }

        $columnNames = implode(', ', array_keys($columnClause));
        $columnValues = implode(', ', $columnClause);

        return [$columnNames, $columnValues];
    }
protected function getTableColumns ( $ entity ) { $ columnClause = [ ] ; // Get all columns for insertion $ allColumns = array_merge ( $ this -> requiredTableColumns ( $ entity ) , $ this -> columns ) ; // Set values for columns foreach ( $ allColumns as $ col => $ type ) { $ columnClause [ $ col ] = isset ( $ this -> columns [ $ col ] ) ? $ this -> quoteOrNot ( $ this -> columns [ $ col ] ) : $ this -> sampleData ( $ type ) ; } $ columnNames = implode ( ', ' , array_keys ( $ columnClause ) ) ; $ columnValues = implode ( ', ' , $ columnClause ) ; return [ $ columnNames , $ columnValues ] ; }
Gets table columns and its values, returns array.
Gets table columns and its values returns array .