schema

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

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

func (*Schema) GetField

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

func (*Schema) RecordValue

func (schema *Schema) RecordValue(dest interface{}) []interface{}

Jump to

Keyboard shortcuts

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