public function getQuery()
{
if (strlen($this->table) === 0) {
throw new QueryException('Missing table name');
}
if (count($this->values) === 0) {
throw new QueryException('Missing values');
}
return 'INSERT INTO ' . $this->table . ' (' . implode(', ', array_keys($this->values)) . ')' . ' VALUES (' . implode(', ', $this->values) . ')';
}