Documentation
¶
Index ¶
- Variables
- func AreSupportedPromscaleExtensionVersionsAvailable(conn *pgx.Conn, extOptions ExtensionMigrateOptions) (bool, error)
- func CheckExtensionsVersion(conn *pgx.Conn, migrationFailedDueToLockError bool, ...) error
- func CheckPromscaleVersion(conn *pgx.Conn) error
- func CheckVersions(conn *pgx.Conn, migrationFailedDueToLockError bool, ...) error
- func FetchInstalledExtensionVersion(conn *pgx.Conn, extensionName string) (semver.Version, bool, error)
- func InstallUpgradePromscaleExtensions(db *pgx.Conn, extOptions ExtensionMigrateOptions) error
- func InstallUpgradeTimescaleDBExtensions(connstr string, extOptions ExtensionMigrateOptions) error
- func MigrateExtension(conn *pgx.Conn, extName string, extSchemaName string, validRange semver.Range, ...) error
- type ExtensionMigrateOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var (
PromscaleExtensionVersion semver.Version
)
Functions ¶
func AreSupportedPromscaleExtensionVersionsAvailable ¶
func AreSupportedPromscaleExtensionVersionsAvailable(conn *pgx.Conn, extOptions ExtensionMigrateOptions) (bool, error)
func CheckExtensionsVersion ¶
func CheckExtensionsVersion(conn *pgx.Conn, migrationFailedDueToLockError bool, extOptions ExtensionMigrateOptions) error
CheckExtensionsVersion checks for the correct version and enables the extension if it is at the right version
func CheckPromscaleVersion ¶
func CheckPromscaleVersion(conn *pgx.Conn) error
func CheckVersions ¶
func CheckVersions(conn *pgx.Conn, migrationFailedDueToLockError bool, extOptions ExtensionMigrateOptions) error
CheckVersions is responsible for verifying the version compatibility of installed Postgresql database and extensions.
func InstallUpgradePromscaleExtensions ¶
func InstallUpgradePromscaleExtensions(db *pgx.Conn, extOptions ExtensionMigrateOptions) error
func InstallUpgradeTimescaleDBExtensions ¶
func InstallUpgradeTimescaleDBExtensions(connstr string, extOptions ExtensionMigrateOptions) error
InstallUpgradeTimescaleDBExtensions installs or updates TimescaleDB Note that after this call any previous connections can break so this has to be called ahead of opening connections.
Also this takes a connection string not a connection because for updates the ALTER has to be the first command on the connection thus we cannot reuse existing connections
func MigrateExtension ¶
func MigrateExtension(conn *pgx.Conn, extName string, extSchemaName string, validRange semver.Range, rangeString string, extOptions ExtensionMigrateOptions) error
Types ¶
type ExtensionMigrateOptions ¶
Click to show internal directories.
Click to hide internal directories.