'Remove all rows for which `field` equals `value`.
Args:
field: Field to use as the key.
value: Key value to delete.
Return:
The number of rows deleted.'

def delete(self, field, value):

    q = Query('DELETE    FROM    {table}    where    {field}    =    :val'.format(table=self._name, field=field))
    q.run(val=value)
    if (not q.numRowsAffected()):
        raise KeyError('No    row    with    {}    =    "{}"'.format(field, value))
    self.changed.emit()
