schema

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 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
}

每一行 column 的结构

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

将任意的自定义的表的struct 对应java中的实体对象解析成表结构

func (*Schema) GetField

func (s *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