posgresqlcolumn

package
v0.0.0-...-a3546ac Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertType

func ConvertType(t string) (string, error)

ConvertType convert culumn type to golang type.

Types

type Column

type Column struct {
	// Field  column name
	Field string
	// Type column type
	Type string
	// IsNull if column can be null
	IsNull string
	// Key  if column is primary key
	Key bool
	// Default default value
	Default interface{}
	// Extra extra data
	Extra string
}

Column mysql column struct

func (*Column) Convert

func (c *Column) Convert() (*columns.Column, error)

Convert convert MysqlColumn to commn column

type Columns

type Columns []Column

Columns mysql columns type

func (*Columns) Columns

func (c *Columns) Columns() ([]*columns.Column, error)

Columns return loaded columns

func (*Columns) Load

func (c *Columns) Load(conn db.Database, table string) error

Load load columns with given database and table name

Jump to

Keyboard shortcuts

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