Versions in this module Expand all Collapse all v0 v0.5.2 Nov 8, 2020 Changes in this version + type ConnectionPoolConfig struct + MaxIdle int + MaxLifetime time.Duration + MaxOpen int + type ErrRetry func(error) bool + type Generic struct + AfterSQL string + CompactSQL string + CountSQL string + DB *sql.DB + DeleteSQL string + FillSQL string + GetCurrentSQL string + GetRevisionAfterSQL string + GetRevisionSQL string + InsertLastInsertIDSQL string + InsertSQL string + LastInsertID bool + ListRevisionStartSQL string + LockWrites bool + Retry ErrRetry + RevisionSQL string + TranslateErr TranslateErr + UpdateCompactSQL string + func Open(ctx context.Context, driverName, dataSourceName string, ...) (*Generic, error) + func (d *Generic) After(ctx context.Context, prefix string, rev, limit int64) (*sql.Rows, error) + func (d *Generic) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error) + func (d *Generic) Compact(ctx context.Context, revision int64) (int64, error) + func (d *Generic) Count(ctx context.Context, prefix string) (int64, int64, error) + func (d *Generic) CurrentRevision(ctx context.Context) (int64, error) + func (d *Generic) DeleteRevision(ctx context.Context, revision int64) error + func (d *Generic) Fill(ctx context.Context, revision int64) error + func (d *Generic) GetCompactRevision(ctx context.Context) (int64, error) + func (d *Generic) GetRevision(ctx context.Context, revision int64) (*sql.Rows, error) + func (d *Generic) Insert(ctx context.Context, key string, create, delete bool, ...) (id int64, err error) + func (d *Generic) IsFill(key string) bool + func (d *Generic) List(ctx context.Context, prefix, startKey string, limit, revision int64, ...) (*sql.Rows, error) + func (d *Generic) ListCurrent(ctx context.Context, prefix string, limit int64, includeDeleted bool) (*sql.Rows, error) + func (d *Generic) Migrate(ctx context.Context) + func (d *Generic) SetCompactRevision(ctx context.Context, revision int64) error + type Stripped string + func (s Stripped) String() string + type TranslateErr func(error) error + type Tx struct + func (t *Tx) Commit() error + func (t *Tx) Compact(ctx context.Context, revision int64) (int64, error) + func (t *Tx) CurrentRevision(ctx context.Context) (int64, error) + func (t *Tx) DeleteRevision(ctx context.Context, revision int64) error + func (t *Tx) GetCompactRevision(ctx context.Context) (int64, error) + func (t *Tx) GetRevision(ctx context.Context, revision int64) (*sql.Rows, error) + func (t *Tx) MustCommit() + func (t *Tx) MustRollback() + func (t *Tx) Rollback() error + func (t *Tx) SetCompactRevision(ctx context.Context, revision int64) error