scheme

package
v0.0.0-...-b20f607 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Primitives = map[string]bool{
	"int32":  true,
	"int64":  true,
	"uint32": true,
	"uint64": true,
	"string": true,
	"bool":   true,
	"float":  true,
	"double": true,
}

Functions

This section is empty.

Types

type Column

type Column struct {
	Name         string      `yaml:"name"`
	Type         string      `yaml:"type"`
	DefaultValue interface{} `yaml:"default-value"`
	Table        *Table
}

type Field

type Field struct {
	Name         string      `yaml:"name"`
	Type         string      `yaml:"type"`
	DefaultValue interface{} `yaml:"default-value"`
}

type GeneratorConfig

type GeneratorConfig struct {
	Models []*Model `yaml:"models"`
	Tables []*Table `yaml:"tables"`
}

func (*GeneratorConfig) Validate

func (c *GeneratorConfig) Validate() (err error)

type Model

type Model struct {
	Name          string   `yaml:"name"`
	Fields        []*Field `yaml:"fields"`
	ExternalModel string   `yaml:"external-model"`
}

type RangeIndex

type RangeIndex struct {
	Name    string   `yaml:"name"`
	IK      []string `yaml:"ik"`
	Columns []string `yaml:"columns"`
	Async   bool     `yaml:"async"`
	Table   *Table
}

type Table

type Table struct {
	Name         string        `yaml:"name"`
	RangeIndexes []*RangeIndex `yaml:"range-indexes"`
	Columns      []*Column     `yaml:"columns"`
	PK           []string      `yaml:"pk"`
	ColumnsSet   map[string]bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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