Why current syntax of DBAL insert/update was chosen?
I understand, that order of params like in sql insert/update, but in doctrine dbal syntax is more convenient:
$success = $connection->insert(
"robots",
array("Astro Boy", 1952),
array("name", "year")
);
and
$success = $connection->insert(
"robots",
array(
'name' => "Astro Boy",
"year" => 1952
)
);
update:
$success = $connection->update(
"robots",
array("name"),
array("New Astro Boy"),
"id = 101"
);
and
$success = $connection->update(
"robots",
array("name" => "New Astro Boy"),
array("id" => "101")
);
I do not say about condition in update, only about field mapping. In doctrine syntax we, for example, can use same arrays with insert and update, or we can use arrays, retrieved from db without transformation.