Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotDocument = errors.New("not document") ErrUnknownProperty = errors.New("unknown property") )
View Source
var ( ErrInvalidField = errors.New("invalid field") ErrOnlyOneAutoIncField = errors.New("only one autoinc field is allowed") )
Functions ¶
func GoNamePrivate ¶
func GoNamePublic ¶
Types ¶
type Document ¶
type Document struct {
Version string `yaml:"version"`
Output Output `yaml:"output"`
Generators Generators `yaml:"generators"`
Imports []*Import `yaml:"imports"`
Records []*Record `yaml:"records"`
}
func NewDocument ¶
func NewDocument() *Document
type Field ¶
type Field struct {
Record *Record `yaml:"-"`
GoName string `yaml:"go_name"`
Name string `yaml:"name"`
Type string `yaml:"type"`
AutoInc bool `yaml:"auto_inc"`
PrimaryKey bool `yaml:"pk"`
Tag string `yaml:"tag"`
}
Field represents a field in the yaml file.
type Generators ¶
type GoType ¶
type Package ¶
Package will keep the information about some packages that will be needed for generation.
type Record ¶
type Record struct {
Document *Document `yaml:"-"`
Schema *Schema `yaml:"-"`
Query *Query `yaml:"-"`
Store *Store `yaml:"-"`
ResultSet *ResultSet `yaml:"-"`
Name string `yaml:"name"`
TableName string `yaml:"table_name"`
Documentation []string `yaml:"-"`
Fields []*Field `yaml:"fields"`
PrimaryKey []*Field `yaml:"-"`
FieldAutoInc *Field `yaml:"-"`
FieldsNameMaxLength int `yaml:"-"`
FieldsTypeMaxLength int `yaml:"-"`
}
Record represents a record.
Click to show internal directories.
Click to hide internal directories.