def update(self, table, rowupdate, where):
        """
        Update matching records.
        - rowupdate is a dict with updated fields, e.g. {'name': 'John'}.
        - See `sqlwhere` for where clause.

        Returns the number of rows updated.

        >>> import getpass
        >>> s = DB(dbname='test', user=getpass.getuser(), host='localhost',
        ... password='')
        >>> s.execute('drop table if exists t2')
        >>> s.execute('create table t2 (id int, name text)')
        >>> s.insert('t2', {'id': 1, 'name': 'Toto'})
        >>> s.select('t2')
        [{'id': 1, 'name': 'Toto'}]
        >>> s.update('t2', {'name': 'Tata'}, {'id': 1})
        1
        >>> s.select('t2')
        [{'id': 1, 'name': 'Tata'}]
        """
        (sql, values) = sqlupdate(table, rowupdate, where)
        return self.execute(sql, values)