pqm

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: MIT Imports: 6 Imported by: 0

README

pqm

Либа для миграции в PostgreSQL

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitTable

func InitTable(tx *sql.Tx, table *Table) error

Types

type Column

type Column interface {
	Get() *column
}

func Array

func Array(title string, def []interface{}, isNotNull bool) Column

func Bigint

func Bigint(title string, def int64, isNotNull bool) Column

func Boolean

func Boolean(title string, def bool) Column

func Bytea

func Bytea(title string, def []byte, isNotNull bool) Column

func DPrecision

func DPrecision(title string, def float64, isNotNull bool) Column

func Integer

func Integer(title string, def int32, isNotNull bool) Column

func JsonB

func JsonB(title string, def json.RawMessage, isNotNull bool) Column

func Text

func Text(title, def string, isNotNull bool) Column

func Timestamp

func Timestamp(title string, def time.Time, isNotNull bool) Column

func VarChar

func VarChar(title, def string, length int64, isNotNull bool) Column

type Key

type Key interface {
	Get() *key
}

func Reference

func Reference(title string, fromColumn, toTable, toColumn string) Key

func Unique

func Unique(title string, fromColumn []string) Key

type Table

type Table struct {
	Title  string
	Column []Column
	Keys   []Key
}

Jump to

Keyboard shortcuts

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