field

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool

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

func (*Bool) CodeGen

func (f *Bool) CodeGen() *CodeGen

func (Bool) NameDatabase

func (f Bool) NameDatabase() string

func (Bool) NameGo

func (f Bool) NameGo() string

func (Bool) NameGoLower

func (f Bool) NameGoLower() string

func (*Bool) TypeDatabase

func (f *Bool) TypeDatabase() string

type BuildConfig

type BuildConfig struct {
	SourcePkg      string
	ToDatabaseName func(base string) string
}

type Byte added in v0.3.0

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

func (*Byte) CodeGen added in v0.3.0

func (f *Byte) CodeGen() *CodeGen

func (Byte) NameDatabase added in v0.3.0

func (f Byte) NameDatabase() string

func (Byte) NameGo added in v0.3.0

func (f Byte) NameGo() string

func (Byte) NameGoLower added in v0.3.0

func (f Byte) NameGoLower() string

func (*Byte) TypeDatabase added in v0.3.0

func (f *Byte) TypeDatabase() string

type CodeGen

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

func (*CodeGen) ConvFrom

func (g *CodeGen) ConvFrom(ctx Context) jen.Code

func (*CodeGen) ConvTo

func (g *CodeGen) ConvTo(ctx Context) jen.Code

func (*CodeGen) ConvToField

func (g *CodeGen) ConvToField(ctx Context) jen.Code

func (*CodeGen) FieldDef

func (g *CodeGen) FieldDef(ctx Context) jen.Code

func (*CodeGen) FilterDefine

func (g *CodeGen) FilterDefine(ctx Context) jen.Code

func (*CodeGen) FilterFunc

func (g *CodeGen) FilterFunc(ctx Context) jen.Code

func (*CodeGen) FilterInit

func (g *CodeGen) FilterInit(ctx Context) jen.Code

func (*CodeGen) SortDefine

func (g *CodeGen) SortDefine(ctx Context) jen.Code

func (*CodeGen) SortFunc

func (g *CodeGen) SortFunc(ctx Context) jen.Code

func (*CodeGen) SortInit

func (g *CodeGen) SortInit(ctx Context) jen.Code

type CodeGenFunc

type CodeGenFunc func(ctx Context) jen.Code

func (CodeGenFunc) Exec

func (fn CodeGenFunc) Exec(ctx Context) jen.Code

type Context

type Context struct {
	SourcePkg string
	TargetPkg string
	Table     Table
	Receiver  *jen.Statement
}

type DatabaseObject

type DatabaseObject struct {
	Name   string
	Fields []Field
}

func (*DatabaseObject) FileName

func (o *DatabaseObject) FileName() string

func (*DatabaseObject) GetFields

func (o *DatabaseObject) GetFields() []Field

func (*DatabaseObject) HasTimestamps

func (o *DatabaseObject) HasTimestamps() bool

func (*DatabaseObject) NameDatabase

func (o *DatabaseObject) NameDatabase() string

func (*DatabaseObject) NameGo

func (o *DatabaseObject) NameGo() string

func (*DatabaseObject) NameGoLower

func (o *DatabaseObject) NameGoLower() string

type Def

type Def struct {
	Nodes   []*NodeTable
	Edges   []*EdgeTable
	Objects []*DatabaseObject
}

func NewDef

func NewDef(source *parser.Output, buildConf *BuildConfig) (*Def, error)

type Edge

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

func (*Edge) CodeGen

func (f *Edge) CodeGen() *CodeGen

func (Edge) NameDatabase

func (f Edge) NameDatabase() string

func (Edge) NameGo

func (f Edge) NameGo() string

func (Edge) NameGoLower

func (f Edge) NameGoLower() string

func (*Edge) Table

func (f *Edge) Table() *EdgeTable

func (*Edge) TypeDatabase

func (f *Edge) TypeDatabase() string

type EdgeTable

type EdgeTable struct {
	Name       string
	In         *Node
	Out        *Node
	Fields     []Field
	Timestamps bool
}

func (*EdgeTable) FileName

func (t *EdgeTable) FileName() string

func (*EdgeTable) GetFields

func (t *EdgeTable) GetFields() []Field

func (*EdgeTable) HasTimestamps

func (t *EdgeTable) HasTimestamps() bool

func (*EdgeTable) NameDatabase

func (t *EdgeTable) NameDatabase() string

func (*EdgeTable) NameGo

func (t *EdgeTable) NameGo() string

func (*EdgeTable) NameGoLower

func (t *EdgeTable) NameGoLower() string

type ElemGetter

type ElemGetter func(name string) (Element, bool)

type Element

type Element interface {
	Named

	FileName() string
	GetFields() []Field
	HasTimestamps() bool
}

type Enum

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

func (*Enum) CodeGen

func (f *Enum) CodeGen() *CodeGen

func (Enum) NameDatabase

func (f Enum) NameDatabase() string

func (Enum) NameGo

func (f Enum) NameGo() string

func (Enum) NameGoLower

func (f Enum) NameGoLower() string

func (*Enum) TypeDatabase

func (f *Enum) TypeDatabase() string

type EnumModel

type EnumModel string

func (EnumModel) NameDatabase

func (m EnumModel) NameDatabase() string

func (EnumModel) NameGo

func (m EnumModel) NameGo() string

func (EnumModel) NameGoLower

func (m EnumModel) NameGoLower() string

type Field

type Field interface {
	NameGo() string
	NameGoLower() string
	NameDatabase() string

	TypeDatabase() string

	CodeGen() *CodeGen
	// contains filtered or unexported methods
}

func Convert

func Convert(source *parser.Output, conf *BuildConfig, field parser.Field) (Field, bool)

type ID

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

func (*ID) CodeGen

func (f *ID) CodeGen() *CodeGen

func (ID) NameDatabase

func (f ID) NameDatabase() string

func (ID) NameGo

func (f ID) NameGo() string

func (ID) NameGoLower

func (f ID) NameGoLower() string

func (*ID) TypeDatabase

func (f *ID) TypeDatabase() string

type Named

type Named interface {
	NameGo() string
	NameGoLower() string
	NameDatabase() string
}

type Node

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

func (*Node) CodeGen

func (f *Node) CodeGen() *CodeGen

func (Node) NameDatabase

func (f Node) NameDatabase() string

func (Node) NameGo

func (f Node) NameGo() string

func (Node) NameGoLower

func (f Node) NameGoLower() string

func (*Node) Table

func (f *Node) Table() *NodeTable

func (*Node) TypeDatabase

func (f *Node) TypeDatabase() string

type NodeTable

type NodeTable struct {
	Name       string
	Fields     []Field
	Timestamps bool
}

func (*NodeTable) FileName

func (t *NodeTable) FileName() string

func (*NodeTable) GetFields

func (t *NodeTable) GetFields() []Field

func (*NodeTable) HasTimestamps

func (t *NodeTable) HasTimestamps() bool

func (*NodeTable) NameDatabase

func (t *NodeTable) NameDatabase() string

func (*NodeTable) NameGo

func (t *NodeTable) NameGo() string

func (*NodeTable) NameGoLower

func (t *NodeTable) NameGoLower() string

type Numeric

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

func (*Numeric) CodeGen

func (f *Numeric) CodeGen() *CodeGen

func (Numeric) NameDatabase

func (f Numeric) NameDatabase() string

func (Numeric) NameGo

func (f Numeric) NameGo() string

func (Numeric) NameGoLower

func (f Numeric) NameGoLower() string

func (*Numeric) TypeDatabase

func (f *Numeric) TypeDatabase() string

type Slice

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

func (*Slice) CodeGen

func (f *Slice) CodeGen() *CodeGen

func (*Slice) Element

func (f *Slice) Element() Field

func (Slice) NameDatabase

func (f Slice) NameDatabase() string

func (Slice) NameGo

func (f Slice) NameGo() string

func (Slice) NameGoLower

func (f Slice) NameGoLower() string

func (*Slice) TypeDatabase

func (f *Slice) TypeDatabase() string

type String

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

func (*String) CodeGen

func (f *String) CodeGen() *CodeGen

func (String) NameDatabase

func (f String) NameDatabase() string

func (String) NameGo

func (f String) NameGo() string

func (String) NameGoLower

func (f String) NameGoLower() string

func (*String) TypeDatabase

func (f *String) TypeDatabase() string

type Struct

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

func (*Struct) CodeGen

func (f *Struct) CodeGen() *CodeGen

func (Struct) NameDatabase

func (f Struct) NameDatabase() string

func (Struct) NameGo

func (f Struct) NameGo() string

func (Struct) NameGoLower

func (f Struct) NameGoLower() string

func (*Struct) Table

func (f *Struct) Table() Table

func (*Struct) TypeDatabase

func (f *Struct) TypeDatabase() string

type Table

type Table interface {
	Named

	FileName() string
	GetFields() []Field
}

type Time

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

func (*Time) CodeGen

func (f *Time) CodeGen() *CodeGen

func (Time) NameDatabase

func (f Time) NameDatabase() string

func (Time) NameGo

func (f Time) NameGo() string

func (Time) NameGoLower

func (f Time) NameGoLower() string

func (*Time) TypeDatabase

func (f *Time) TypeDatabase() string

type URL added in v0.3.0

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

func (*URL) CodeGen added in v0.3.0

func (f *URL) CodeGen() *CodeGen

func (URL) NameDatabase added in v0.3.0

func (f URL) NameDatabase() string

func (URL) NameGo added in v0.3.0

func (f URL) NameGo() string

func (URL) NameGoLower added in v0.3.0

func (f URL) NameGoLower() string

func (*URL) TypeDatabase added in v0.3.0

func (f *URL) TypeDatabase() string

type UUID

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

func (*UUID) CodeGen

func (f *UUID) CodeGen() *CodeGen

func (UUID) NameDatabase

func (f UUID) NameDatabase() string

func (UUID) NameGo

func (f UUID) NameGo() string

func (UUID) NameGoLower

func (f UUID) NameGoLower() string

func (*UUID) TypeDatabase

func (f *UUID) TypeDatabase() string

Jump to

Keyboard shortcuts

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