📅  最后修改于: 2022-03-11 14:58:59.059000             🧑  作者: Mango
commandTag, err := conn.Exec(context.Background(), "delete from widgets where id=$1", 42)
if err != nil {
return err
}
if commandTag.RowsAffected() != 1 {
return errors.New("No row found to delete")
}