db

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Index        int    `db:"Index"`    //序号
	Name         string `db:"Name"`     //字段名
	IsPK         bool   `db:"IsPK"`     //是否主键
	IsInc        bool   `db:"IsInc"`    //是否自增
	DataType     string `db:"DataType"` //数据类型
	LangDataType string
	IsNull       bool   `db:"IsNull"`       //是否可空
	DefaultValue string `db:"DefaultValue"` //默认值
	Comment      string `db:"Comment"`      //注释
}

Column 表列信息

type Provider

type Provider interface {
	GetTableNames() ([]string, error)
	GetTable(tableName string) (*Table, error)
}

Provider 数据源接口

type Table

type Table struct {
	Name    string
	Columns []*Column
}

Table 表信息

type TypeMappingFunc

type TypeMappingFunc func(lang string, typ string, isNull bool) string

TypeMappingFunc 数据type转换函数

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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