src/Sqlite/SqliteConnection.php
public function update(string $table, array $identity, array $values): Promise
    {
        return new Coroutine(function () use ($table, $identity, $values) {
            $params = [];
            $set = [];
            $where = [];
            
            foreach ($values as $k => $v) {
                $set[] = $this->quoteIdentifier($k) . ' = ?';
                $params[] = $v;
            }
            
            foreach ($identity as $k => $v) {
                $where[] = $this->quoteIdentifier($k) . ' = ?';
                $params[] = $v;
            }
            
            $sql = "UPDATE " . $this->quoteIdentifier($this->applySchemaObjectPrefix($table));
            $sql .= " SET " . \implode(', ', $set);
            $sql .= " WHERE " . \implode(' AND ', $where);
            
            $result = yield $this->prepare($sql)->bindAll($params)->execute();
            
            return $result->affectedRows();
        });
    }
public function update(string $table, array $identity, array $values): Promise
    {
        return new Coroutine(function () use ($table, $identity, $values) {
            $params = [];
            $set = [];
            $where = [];
            
            foreach ($values as $k => $v) {
                $set[] = $this->quoteIdentifier($k) . ' = ?';
                $params[] = $v;
            }
            
            foreach ($identity as $k => $v) {
                $where[] = $this->quoteIdentifier($k) . ' = ?';
                $params[] = $v;
            }
            
            $sql = "UPDATE " . $this->quoteIdentifier($this->applySchemaObjectPrefix($table));
            $sql .= " SET " . \implode(', ', $set);
            $sql .= " WHERE " . \implode(' AND ', $where);
            
            $result = yield $this->prepare($sql)->bindAll($params)->execute();
            
            return $result->affectedRows();
        });
    }
{@inheritdoc}