parser

package
v0.0.0-...-65baf40 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: MIT Imports: 12 Imported by: 1

Documentation

Overview

https://entgo.io/zh/docs/schema-fields

Index

Constants

View Source
const TemplateSchema = `` /* 568-byte string literal not displayed */

Variables

This section is empty.

Functions

func Parse

func Parse(sql string) (string, error)

func ParseTpl

func ParseTpl(sch *Schema) (string, error)

Types

type Field

type Field struct {
	Name            stringx.String
	IsPrimary       bool
	IsUnique        bool
	IsAutoIncrement bool
	IsNotNull       bool
	DefaultValue    parser.DefaultValue
	FieldFuncName   string
	DataTypeSource  string
	DataType        parser.DataType
	Comment         string
	SeqInIndex      int
	OrdinalPosition int
}

Field describes a table field

type Schema

type Schema struct {
	TableName    string
	Fields       []template.HTML
	IsHaveFields bool
	Imports      []string
}

func ParseSchema

func ParseSchema(e *parser.Table) (*Schema, error)

Jump to

Keyboard shortcuts

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