rflt

package
v0.2.14 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// nameOfTag        = "gpa" // tag 名称
	TagIgnore        = "-"
	TagPrimaryKey    = "pk"
	TagAutoIncrement = "autoincr"
	TagNullAble      = "null"
	TagNotNull       = "not-null"
	TagIndex         = "index"
	TagUnique        = "unique"
	TagDefault       = "default"
	TagUTC           = "utc"
	TagLocal         = "local"
)

Variables

This section is empty.

Functions

func Parse

func Parse(model interface{}, pp *PropsParser) (*schema.Table, error)

func ParseTag

func ParseTag(col *schema.Column, context *Context, fieldName, tag string, fnGetDefaultSQLType func() *types.SQLType) error

func SplitTag

func SplitTag(tag string) (tags []string)

Types

type Context

type Context struct {
	// contains filtered or unexported fields
}

func NewContext

func NewContext(col *schema.Column) *Context

type PropsParser

type PropsParser struct {
	// contains filtered or unexported fields
}

func NewPropsParser

func NewPropsParser(dialect dialect.Dialect) *PropsParser

func (*PropsParser) Parse

func (p *PropsParser) Parse(col *schema.Column, field reflect.StructField, fieldVal reflect.Value) error

Jump to

Keyboard shortcuts

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