func (p *MySQL) Add(ctx context.Context, evt *outboxer.OutboxMessage) error {
	// nolint
	query := fmt.Sprintf(`INSERT INTO %s (payload, options, headers) VALUES (?, ?, ?)`, p.EventStoreTable)
	if _, err := p.conn.ExecContext(ctx, query, evt.Payload, evt.Options, evt.Headers); err != nil {
		return fmt.Errorf("failed to insert message into the data store: %w", err)
	}

	return nil
}
// Add adds the message to the data store
Add adds the message to the data store
// Add adds the message to the data store
func (p *MySQL) Add(ctx context.Context, evt *outboxer.OutboxMessage) error {
	query := fmt.Sprintf(`INSERT INTO %s (payload, options, headers) VALUES (?, ?, ?)`, p.EventStoreTable)
	if _, err := p.conn.ExecContext(ctx, query, evt.Payload, evt.Options, evt.Headers); err != nil {
		return fmt.Errorf("failed to insert message into the data store: %w", err)
	}
	return nil
}
func ( p * MySQL ) Add ( ctx context . Context , evt * outboxer . OutboxMessage ) error { query := fmt . Sprintf ( `INSERT INTO %s (payload, options, headers) VALUES (?, ?, ?)` , p . EventStoreTable ) if _ , err := p . conn . ExecContext ( ctx , query , evt . Payload , evt . Options , evt . Headers ) ; err != nil { return fmt . Errorf ( " " , err ) } return nil }
Add adds the message to the data store
Add adds the message to the data store
// nolint