db

package
v0.0.0-...-a163782 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mapper

type Mapper struct {
	*pgu.Mapper
	*Schema
}

func New

func New(db pg.DB) *Mapper

type Schema

type Schema struct {
	pgmodels.Model

	ModuleName string    `pg:"module_name"` // 模块名称
	FullName   string    `pg:"full_name"`   // 运行模块的全程(make_migration)生成
	ExecTime   time.Time `pg:"exec_time"`   // 运行时间
	Version    string    `pg:"version"`     // 迁移版本
	Force      bool      `pg:"force"`       // 是否为强制运行
	Success    bool      `pg:"success"`     // 是否运行成功(不报错即为运行成功)
	IsFake     bool      `pg:"is_fake"`     // 是否是人工标记为执行成功
	// contains filtered or unexported fields
}
var (
	S Schema
)

func (Schema) CreateConstraint

func (s Schema) CreateConstraint(db pg.DB) error

func (Schema) CreateIndex

func (s Schema) CreateIndex(db pg.DB) error

func (Schema) CreateTable

func (s Schema) CreateTable(db pg.DB) error

func (Schema) CreateTrigger

func (s Schema) CreateTrigger(db pg.DB) error

Jump to

Keyboard shortcuts

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