src/SAREhub/Commons/Misc/SqliteHashStorage.php
public function updateMulti(array $hashes)
    {
        $startSql = "UPDATE " . $this->tableName;
        $this->storage->exec('BEGIN TRANSACTION');
        foreach ($hashes as $id => $hash) {
            $this->storage->exec($startSql . " SET hash='$hash' WHERE id='$id'");
        }
        $this->storage->exec('END TRANSACTION');
    }
public function updateMulti(array $hashes)
    {
        $startSql = "UPDATE " . $this->tableName;
        $this->storage->exec('BEGIN TRANSACTION');
        foreach ($hashes as $id => $hash) {
            $this->storage->exec($startSql . " SET hash='$hash' WHERE id='$id'");
        }
        $this->storage->exec('END TRANSACTION');
    }
public function updateMulti ( array $ hashes ) { $ startSql = "UPDATE " . $ this -> tableName ; $ this -> storage -> exec ( 'BEGIN TRANSACTION' ) ; foreach ( $ hashes as $ id => $ hash ) { $ this -> storage -> exec ( $ startSql . " SET hash='$hash' WHERE id='$id'" ) ; } $ this -> storage -> exec ( 'END TRANSACTION' ) ; }
Updating hashes in batch for better performance
@param array $hashes 'id' => 'hash'
Updating hashes in batch for better performance