InsertQuery::getClauseValues PHP Method

getClauseValues() protected method

protected getClauseValues ( ) : string
return string
    protected function getClauseValues()
    {
        $valuesArray = array();
        foreach ($this->statements['VALUES'] as $rows) {
            // literals should not be parametrized.
            // They are commonly used to call engine functions or literals.
            // Eg: NOW(), CURRENT_TIMESTAMP etc
            $placeholders = array_map(array($this, 'parameterGetValue'), $rows);
            $valuesArray[] = '(' . implode(', ', $placeholders) . ')';
        }
        $columns = implode(', ', $this->columns);
        $values = implode(', ', $valuesArray);
        return " ({$columns}) VALUES {$values}";
    }