func (p *MySQL) SetAsDispatched(ctx context.Context, id int64) error {
	query := fmt.Sprintf(`
update %s
set
    dispatched = true,
    dispatched_at = now(),
    options = '{}',
	headers = '{}'
where id = ?;
`, p.EventStoreTable)
	if _, err := p.conn.ExecContext(ctx, query, id); err != nil {
		return fmt.Errorf("failed to set message as dispatched: %w", err)
	}

	return nil
}
// SetAsDispatched sets one message as dispatched
SetAsDispatched sets one message as dispatched
// SetAsDispatched sets one message as dispatched
func (p *MySQL) SetAsDispatched(ctx context.Context, id int64) error {
	query := fmt.Sprintf(`
update %s
set
    dispatched = true,
    dispatched_at = now(),
    options = '{}',
	headers = '{}'
where id = ?;
`, p.EventStoreTable)
	if _, err := p.conn.ExecContext(ctx, query, id); err != nil {
		return fmt.Errorf("failed to set message as dispatched: %w", err)
	}
	return nil
}
func ( p * MySQL ) SetAsDispatched ( ctx context . Context , id int64 ) error { query := fmt . Sprintf ( `
update %s
set
    dispatched = true,
    dispatched_at = now(),
    options = '{}',
	headers = '{}'
where id = ?;
` , p . EventStoreTable ) if _ , err := p . conn . ExecContext ( ctx , query , id ) ; err != nil { return fmt . Errorf ( " " , err ) } return nil }
SetAsDispatched sets one message as dispatched
SetAsDispatched sets one message as dispatched