Documentation
¶
Index ¶
- Variables
- type ConnectionOptions
- type MySQL
- func (db *MySQL) Close() error
- func (db *MySQL) Connect() error
- func (db *MySQL) Connection() *sqlx.DB
- func (db *MySQL) EventTx(ctx context.Context, etxFn db.EventTxFn) (eventId *events.EventID, err error)
- func (db *MySQL) EventsTx(ctx context.Context, etxFn db.EventsTxFn) (eventIds []events.EventID, err error)
- func (db *MySQL) Migrate(ctx context.Context, options *db.MigrationOptions) (*db.MigrationResult, error)
- func (db *MySQL) Tx(ctx context.Context, txFn db.TxFn) (err error)
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoDSN = errors.New("no dsn provided") ErrNoMigrator = errors.New("no migrator provided") )
View Source
var DefaultConnectionOptions = ConnectionOptions{ MaxOpenCons: 100, MaxIdleCons: 10, ConnMaxLifetime: 1 * time.Minute, ConnMaxIdleTime: 30 * time.Second, }
View Source
var (
ErrNoOutboxConfigured = errors.New("no event outbox configured")
)
Functions ¶
This section is empty.
Types ¶
type ConnectionOptions ¶ added in v0.13.0
type MySQL ¶
type MySQL struct {
// contains filtered or unexported fields
}
func (*MySQL) Connection ¶
func (*MySQL) EventTx ¶
func (db *MySQL) EventTx(ctx context.Context, etxFn db.EventTxFn) (eventId *events.EventID, err error)
EventTx is a convenience method for emitting a single event in a single transaction.
func (*MySQL) EventsTx ¶
func (db *MySQL) EventsTx(ctx context.Context, etxFn db.EventsTxFn) (eventIds []events.EventID, err error)
EventsTx is a convenience method for emitting multiple events in a single transaction.
func (*MySQL) Migrate ¶
func (db *MySQL) Migrate(ctx context.Context, options *db.MigrationOptions) (*db.MigrationResult, error)
Click to show internal directories.
Click to hide internal directories.