postgres

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string `required:"true"`
	Port     int    `required:"true"`
	User     string `required:"true"`
	Password string `required:"true"`
	Database string `required:"true"`
}

type MigrateDirection

type MigrateDirection string
const (
	MigrateDirectionUp   MigrateDirection = "UP"
	MigrateDirectionDown MigrateDirection = "DOWN"
)

type Postgres

type Postgres struct {
	*sqlx.DB
	Vectors *vectors
}

func Open

func Open(cfg *Config, namespace, subsystem string) (*Postgres, error)

func (*Postgres) Migrate

func (p *Postgres) Migrate(directory string, files *embed.FS, direction MigrateDirection) error

Jump to

Keyboard shortcuts

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