Documentation
¶
Index ¶
- type ConnectionPoolConfig
- type ErrCode
- type ErrRetry
- type Generic
- 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) (server.Transaction, error)
- func (d *Generic) Compact(ctx context.Context, revision int64) (int64, error)
- func (d *Generic) Count(ctx context.Context, prefix, startKey string, revision int64) (int64, int64, error)
- func (d *Generic) CountCurrent(ctx context.Context, prefix, startKey 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) FillRetryDelay(ctx context.Context)
- func (d *Generic) GetCompactRevision(ctx context.Context) (int64, error)
- func (d *Generic) GetSize(ctx context.Context) (int64, 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, startKey string, limit int64, ...) (*sql.Rows, error)
- func (d *Generic) Migrate(ctx context.Context)
- func (d *Generic) PostCompact(ctx context.Context) error
- func (d *Generic) SetCompactRevision(ctx context.Context, revision int64) error
- type TranslateErr
- type Tx
- 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) MustCommit()
- func (t *Tx) MustRollback()
- func (t *Tx) Rollback() error
- func (t *Tx) SetCompactRevision(ctx context.Context, revision int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionPoolConfig ¶
type Generic ¶
type Generic struct {
sync.Mutex
LockWrites bool
LastInsertID bool
DB *sql.DB
GetCurrentSQL string
GetCurrentValSQL string
ListRevisionStartSQL string
ListRevisionStartValSQL string
GetRevisionAfterSQL string
GetRevisionAfterValSQL string
CountCurrentSQL string
CountRevisionSQL string
AfterOldValSQL string
DeleteSQL string
CompactSQL string
UpdateCompactSQL string
PostCompactSQL string
InsertSQL string
FillSQL string
InsertLastInsertIDSQL string
GetSizeSQL string
Retry ErrRetry
InsertRetry ErrRetry
TranslateErr TranslateErr
ErrCode ErrCode
FillRetryDuration time.Duration
}
func Open ¶
func Open(ctx context.Context, wg *sync.WaitGroup, driverName, dataSourceName string, connPoolConfig ConnectionPoolConfig, paramCharacter string, numbered bool, metricsRegisterer prometheus.Registerer) (*Generic, error)
func (*Generic) CountCurrent ¶ added in v0.11.4
func (*Generic) CurrentRevision ¶
func (*Generic) DeleteRevision ¶
func (*Generic) FillRetryDelay ¶ added in v0.11.0
func (*Generic) GetCompactRevision ¶
func (*Generic) ListCurrent ¶
func (*Generic) PostCompact ¶ added in v0.6.5
type TranslateErr ¶
type Tx ¶
type Tx struct {
// contains filtered or unexported fields
}
func (*Tx) MustCommit ¶
func (t *Tx) MustCommit()
func (*Tx) MustRollback ¶
func (t *Tx) MustRollback()
Click to show internal directories.
Click to hide internal directories.