// Delete removes a user by id.
Delete removes a user by id.
// Delete removes a user by id .
func (ur *UserRepository) Delete(ctx context.Context, id uint) error {
	q := `DELETE FROM users WHERE id=$1;`
	stmt, err := ur.Data.DB.PrepareContext(ctx, q)
	if err != nil {
		return err
	}
	defer stmt.Close()
	_, err = stmt.ExecContext(ctx, id)
	if err != nil {
		return err
	}
	return nil
}
func ( ur * UserRepository ) Delete ( ctx context . Context , id uint ) error { q := `DELETE FROM users WHERE id=$1;` stmt , err := ur . Data . DB . PrepareContext ( ctx , q ) if err != nil { return err } defer stmt . Close ( ) _ , err = stmt . ExecContext ( ctx , id ) if err != nil { return err } return nil }
Delete removes a user by id.
Delete removes a user by id .