protected final function SaveRows(IConnection $Connection, Table $Table, array $RowsWithoutPrimaryKey, array $RowsWithPrimaryKeys, ReturningDataKeyGenerator $ReturningDataKeyGenerator = null, PostIndividualInsertKeyGenerator $PostIndividualInsertKeyGenerator = null)
{
if (count($RowsWithoutPrimaryKey) > 0) {
if ($PostIndividualInsertKeyGenerator !== null) {
$this->InsertRowsIndividually($Connection, $Table, $RowsWithoutPrimaryKey, $PostIndividualInsertKeyGenerator);
} else {
$this->InsertRows($Connection, $Table, $RowsWithoutPrimaryKey, $ReturningDataKeyGenerator);
}
}
if (count($RowsWithPrimaryKeys) > 0) {
$this->UpsertRows($Connection, $Table, $RowsWithPrimaryKeys);
}
}