timescale

package
v0.22.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2022 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MinTimescaleVersion = version.Must(version.NewVersion("2.0"))

Functions

func ValidateTimescaleVersion added in v0.22.0

func ValidateTimescaleVersion(ctx context.Context, pool *pgxpool.Pool) error

ValidateTimescaleVersion checks that Timescale plugin version available through pool is not lower than wanted version. In this case it returns nil. Otherwise returns error describing current and desired version or any other error encountered during the check.

Types

type DDLManager

type DDLManager struct {
	// contains filtered or unexported fields
}

func NewDDLManager

func NewDDLManager(l hclog.Logger, pool *pgxpool.Pool, cfg *history.Config, dt schema.DialectType) (*DDLManager, error)

func (*DDLManager) AddHistoryFunctions added in v0.21.1

func (d *DDLManager) AddHistoryFunctions(ctx context.Context) error

func (*DDLManager) Close added in v0.21.1

func (d *DDLManager) Close()

func (*DDLManager) DropViews added in v0.21.1

func (d *DDLManager) DropViews(ctx context.Context) error

DropViews drops all hypertable related views. This must be called before any migrations can be run.

func (*DDLManager) SetupHistory

func (d *DDLManager) SetupHistory(ctx context.Context) error

SetupHistory is run after any migrations, finalizing history setup

type Executor

type Executor struct {
	// contains filtered or unexported fields
}

func New

func New(logger hclog.Logger, dsn string, cfg *history.Config) (*Executor, error)

func (Executor) Finalize

func (e Executor) Finalize(ctx context.Context, retErr error) error

func (Executor) Prepare added in v0.21.1

func (e Executor) Prepare(ctx context.Context) error

func (*Executor) Setup

func (e *Executor) Setup(ctx context.Context) (string, error)

Setup sets all required history functions and validation checks that it can run cleanly.

func (Executor) Validate

func (e Executor) Validate(ctx context.Context) (bool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL