func New(db *sql.DB, tableName string) eventsource.Store {
	return &store{
		db:        &driver.Generic{DB: db},
		tableName: tableName,
	}
}
New creates a new event source store.
package sqlstore
import (
	"context"
	"database/sql"
	"fmt"
	"strings"
	"github.com/pkg/errors"
	"github.com/SKF/go-eventsource/v2/eventsource"
	"github.com/SKF/go-eventsource/v2/eventsource/stores/sqlstore/driver"
)
type EventDB interface {
	Load(ctx context.Context, query string, args []interface{}) ([]eventsource.Record, error)
	NewTransaction(ctx context.Context, query string, records ...eventsource.Record) (eventsource.StoreTransaction, error)
}
type PGXStore interface {
	eventsource.Store
	WithPostgresNotify() PGXStore
}
type store struct {
	db        EventDB
	tableName string
}
var (
	columns = []column{columnAggregateID, columnSequenceID, columnCreatedAt, columnUserID, columnType, columnData}
	saveSQL = "INSERT INTO %s (aggregate_id, sequence_id, created_at, user_id, type, data) VALUES ($1, $2, $3, $4, $5, $6)"
	loadSQL = "SELECT aggregate_id, sequence_id, created_at, user_id, type, data FROM %s"
)