Documentation ¶
Index ¶
- Variables
- func MigrateIfNeeded(targetDB db.DB, network utils.Network, log utils.SimpleLogger) error
- func SchemaVersion(targetDB db.DB) (uint64, error)
- type BucketMigrator
- func (m *BucketMigrator) Before()
- func (m *BucketMigrator) Migrate(txn db.Transaction, network utils.Network) error
- func (m *BucketMigrator) WithBatchSize(batchSize uint) *BucketMigrator
- func (m *BucketMigrator) WithBefore(before func()) *BucketMigrator
- func (m *BucketMigrator) WithKeyFilter(keyFilter BucketMigratorKeyFilter) *BucketMigrator
- type BucketMigratorDoFunc
- type BucketMigratorKeyFilter
- type Migration
- type MigrationFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCallWithNewTransaction = errors.New("call with new transaction")
Functions ¶
func MigrateIfNeeded ¶
Types ¶
type BucketMigrator ¶ added in v0.5.0
type BucketMigrator struct {
// contains filtered or unexported fields
}
func NewBucketMigrator ¶ added in v0.5.0
func NewBucketMigrator(target db.Bucket, do BucketMigratorDoFunc) *BucketMigrator
func NewBucketMover ¶ added in v0.5.0
func NewBucketMover(source, destination db.Bucket) *BucketMigrator
func (*BucketMigrator) Before ¶ added in v0.5.0
func (m *BucketMigrator) Before()
func (*BucketMigrator) Migrate ¶ added in v0.5.0
func (m *BucketMigrator) Migrate(txn db.Transaction, network utils.Network) error
func (*BucketMigrator) WithBatchSize ¶ added in v0.5.0
func (m *BucketMigrator) WithBatchSize(batchSize uint) *BucketMigrator
func (*BucketMigrator) WithBefore ¶ added in v0.5.0
func (m *BucketMigrator) WithBefore(before func()) *BucketMigrator
func (*BucketMigrator) WithKeyFilter ¶ added in v0.5.0
func (m *BucketMigrator) WithKeyFilter(keyFilter BucketMigratorKeyFilter) *BucketMigrator
type BucketMigratorDoFunc ¶ added in v0.5.0
type BucketMigratorKeyFilter ¶ added in v0.5.0
type Migration ¶ added in v0.5.0
type Migration interface { Before() Migrate(db.Transaction, utils.Network) error }
type MigrationFunc ¶ added in v0.5.0
type MigrationFunc func(db.Transaction, utils.Network) error
func (MigrationFunc) Migrate ¶ added in v0.5.0
func (f MigrationFunc) Migrate(txn db.Transaction, network utils.Network) error
Migrate returns f(txn).
Click to show internal directories.
Click to hide internal directories.