orm

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AvailableExtension added in v0.5.0

type AvailableExtension struct {
	Name             string  `json:"name"`
	DefaultVersion   string  `json:"default_version"`
	InstalledVersion *string `json:"installed_version"`
	Comment          string  `json:"comment"`
}

AvailableExtension ...

type Config added in v0.5.0

type Config struct {
	Alias           string
	Name            string
	User            string
	Password        string
	Host            string
	Port            string
	Debug           bool
	MaxIdleConns    int
	MaxOpenConns    int
	ConnMaxLifeTime int
}

Config ...

func (Config) String added in v0.5.0

func (c Config) String() string

String ...

type Orm

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

Orm ...

func NewOrm

func NewOrm(lc fx.Lifecycle,
	cfg *Config,
	_ *backup.Backup) (orm *Orm, db *gorm.DB, err error)

NewOrm ...

func (*Orm) Check added in v0.12.0

func (o *Orm) Check() (err error)

func (*Orm) CheckAvailableExtension added in v0.12.0

func (o *Orm) CheckAvailableExtension(extName string) (exist bool)

func (*Orm) CheckExtensions added in v0.12.0

func (o *Orm) CheckExtensions() (err error)

func (*Orm) CheckInstalledExtension added in v0.12.0

func (o *Orm) CheckInstalledExtension(extName string) (exist bool)

func (*Orm) DB added in v0.5.0

func (o *Orm) DB() *sql.DB

DB ...

func (Orm) ExtTimescaledbEnabled added in v0.5.0

func (o Orm) ExtTimescaledbEnabled() bool

ExtTimescaledbEnabled ...

func (*Orm) Ping added in v0.12.0

func (o *Orm) Ping() (latency float64, err error)

func (*Orm) Shutdown

func (o *Orm) Shutdown() (err error)

Shutdown ...

func (*Orm) Start added in v0.5.0

func (o *Orm) Start() (err error)

Start ...

Jump to

Keyboard shortcuts

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