driver

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Options() *types.Options
	Tables() []*Table
	Schema() string
	ParseColumnTag(tf *TableColumn) types.Tag
	ParseColumnType(tf *TableColumn) string
}

Client .

func Mysql

func Mysql(opts *types.Options) Client

Mysql .

func Postgres

func Postgres(opts *types.Options) Client

Postgres .

type Table

type Table struct {
	TableExpand
	Columns []*TableColumn // 表字段
}

Table db table

type TableColumn

type TableColumn struct {
	ColumnName string // 列名
	ColumnKey  string // 键类别
	Extra      string // 自增
	IsNull     string // NOT NULL
	DataType   string // 类型
	ColumnType string // 类型+长度
	ColumnDesc string // 注释
}

TableColumn fields of db table

type TableExpand

type TableExpand struct {
	TableName string // 表名
	TableDesc string // 表注释
}

TableExpand db table annoation

Jump to

Keyboard shortcuts

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