Documentation ¶
Index ¶
- Variables
- func ExecuteInTx(ctx context.Context, db *sql.DB, opts *sql.TxOptions, ...) (err error)
- func WithInstance(instance *sql.DB, config *Config) (database.Driver, error)
- type Config
- type YugabyteDB
- func (c *YugabyteDB) Close() error
- func (c *YugabyteDB) Drop() (err error)
- func (c *YugabyteDB) Lock() error
- func (c *YugabyteDB) Open(dbURL string) (database.Driver, error)
- func (c *YugabyteDB) Run(migration io.Reader) error
- func (c *YugabyteDB) SetVersion(version int, dirty bool) error
- func (c *YugabyteDB) Unlock() error
- func (c *YugabyteDB) Version() (version int, dirty bool, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNilConfig = errors.New("no config") ErrNoDatabaseName = errors.New("no database name") ErrMaxRetriesExceeded = errors.New("max retries exceeded") )
View Source
var DefaultLockTable = "migrations_locks"
View Source
var DefaultMigrationsTable = "migrations"
Functions ¶
func ExecuteInTx ¶
Types ¶
type YugabyteDB ¶
type YugabyteDB struct {
// contains filtered or unexported fields
}
func (*YugabyteDB) Close ¶
func (c *YugabyteDB) Close() error
func (*YugabyteDB) Drop ¶
func (c *YugabyteDB) Drop() (err error)
func (*YugabyteDB) Lock ¶
func (c *YugabyteDB) Lock() error
Locking is done manually with a separate lock table. Implementing advisory locks in YugabyteDB is being discussed See: https://github.com/yugabyte/yugabyte-db/issues/3642
func (*YugabyteDB) SetVersion ¶
func (c *YugabyteDB) SetVersion(version int, dirty bool) error
func (*YugabyteDB) Unlock ¶
func (c *YugabyteDB) Unlock() error
Locking is done manually with a separate lock table. Implementing advisory locks in YugabyteDB is being discussed See: https://github.com/yugabyte/yugabyte-db/issues/3642
Click to show internal directories.
Click to hide internal directories.