/**
* Simply create record without validation and triggers.
*
* @param array $args
*/
public function rawCreate(array $args)
{
$dsId = $this->writeSourceId;
$conn = $this->getWriteConnection();
$k = static::PRIMARY_KEY;
$driver = $this->getWriteQueryDriver();
$query = new InsertQuery();
$query->insert($args);
$query->into($this->table);
$query->returning($k);
$arguments = new ArgumentArray();
$sql = $query->toSql($driver, $arguments);
$stm = $conn->prepare($sql);
$stm->execute($arguments->toArray());
$pkId = null;
if ($driver instanceof PDOPgSQLDriver) {
$pkId = $stm->fetchColumn();
} else {
// lastInsertId is supported in SQLite and MySQL
$pkId = $conn->lastInsertId();
}
$this->_data = $args;
$this->_data[$k] = $pkId;
return $this->reportSuccess('Create success', array('sql' => $sql, 'type' => Result::TYPE_CREATE));
}