public function format() { $insert = $this->insertQuery->getParameterList(); $parameterList = []; $insertList = []; foreach ($insert as $key => $value) { $parameterList[$keyId = sha1($key)] = $value; $insertList[$this->formatterProvider->delimite($key)] = $value; } return $this->sql(sprintf('INSERT INTO %s (%s) VALUES (:%s);', $this->formatterProvider->delimite($this->insertQuery->getTable()), implode(', ', array_keys($insertList)), implode(', :', array_keys($parameterList))), $parameterList); }
protected function create(IStorable $storable, array $store) { $query = new InsertQuery($storable->schema()->getName(), $store); $query->add($this->createPrimaryProperty()->getName(), $storable->guid()); $this->exec($query); }