schema

package
v0.0.0-...-8a62f83 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	Name string //字段名
	Type string //字段类型
	Tag  string //约束条件
}

type Schema

type Schema struct {
	Model      interface{} //映射对象
	Name       string      //表名
	Fields     []*Field    //字段
	FieldNames []string    //字段名
	// contains filtered or unexported fields
}

func Parse

func Parse(dest interface{}, d dialect.Dialect) *Schema

将结构体解析为Schema

func (*Schema) GetField

func (schema *Schema) GetField(name string) *Field

func (*Schema) RecordValues

func (Schema *Schema) RecordValues(dest interface{}) []interface{}

Jump to

Keyboard shortcuts

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