model

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 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 Field

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

func (*Field) Column

func (f *Field) Column() *plugin.Column

func (*Field) Comment

func (f *Field) Comment() string

func (*Field) DBName

func (f *Field) DBName() string

func (*Field) EmbedFields

func (f *Field) EmbedFields() []Field

func (*Field) IsPrimaryKey

func (f *Field) IsPrimaryKey() bool

func (*Field) Name

func (f *Field) Name() string

func (*Field) Tags

func (f *Field) Tags() map[string]string

func (*Field) Type

func (f *Field) Type() *gotype.GoType

type Struct

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

func BuildStructs

func BuildStructs(
	req *plugin.GenerateRequest,
	options *opts.Options,
	customTypes []sqltype.CustomType,
) []Struct

func NewStruct

func NewStruct(
	table *plugin.Table,
	options *opts.Options,
	goTypeFormatter *gotype.GoTypeFormatter,
) *Struct

func (*Struct) EscapedFullTableName added in v0.1.4

func (s *Struct) EscapedFullTableName() string

func (*Struct) Fields

func (s *Struct) Fields() []Field

func (*Struct) FullTableName

func (s *Struct) FullTableName() string

func (*Struct) GetImports

func (s *Struct) GetImports() []imports.Import

func (*Struct) HasPrimaryKey

func (s *Struct) HasPrimaryKey() bool

func (*Struct) TableName

func (s *Struct) TableName() string

func (*Struct) Type

func (s *Struct) Type() *gotype.GoType

Jump to

Keyboard shortcuts

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