ddl

package
v1.2.0-rc Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractAlterTableAddColComment

func ExtractAlterTableAddColComment(stmt *ast.AlterTableSpec) string

func ExtractAlterTableAddColName

func ExtractAlterTableAddColName(stmt *ast.AlterTableSpec) string

func ExtractAlterTableAddColType

func ExtractAlterTableAddColType(stmt *ast.AlterTableSpec) string

func ExtractAlterTableChangeColComment

func ExtractAlterTableChangeColComment(spec *ast.AlterTableSpec) string

func ExtractAlterTableChangeColNewName

func ExtractAlterTableChangeColNewName(stmt *ast.AlterTableSpec) string

func ExtractAlterTableChangeColOldName

func ExtractAlterTableChangeColOldName(stmt *ast.AlterTableSpec) string

func ExtractAlterTableChangeColType

func ExtractAlterTableChangeColType(spec *ast.AlterTableSpec) string

func ExtractAlterTableDropColName

func ExtractAlterTableDropColName(stmt *ast.AlterTableSpec) string

func ExtractAlterTableModifyColComment

func ExtractAlterTableModifyColComment(stmt *ast.AlterTableSpec) string

func ExtractAlterTableModifyColName

func ExtractAlterTableModifyColName(stmt *ast.AlterTableSpec) string

func ExtractAlterTableModifyColType

func ExtractAlterTableModifyColType(stmt *ast.AlterTableSpec) string

func ExtractAlterTableName

func ExtractAlterTableName(stmt *ast.AlterTableStmt) string

func ExtractColComment

func ExtractColComment(col *ast.ColumnDef) string

func ExtractColName

func ExtractColName(col *ast.ColumnDef) string

func ExtractColType

func ExtractColType(col *ast.ColumnDef) string

func ExtractCreateName

func ExtractCreateName(stmt *ast.CreateTableStmt) string

func ExtractDropNames

func ExtractDropNames(stmt *ast.DropTableStmt) []string

func ExtractRename

func ExtractRename(stmt *ast.RenameTableStmt) (newName, oldName string)

Types

type OnlySchemaOpenapi

type OnlySchemaOpenapi struct {
	Openapi    string            `json:"openapi" yaml:"openapi"`
	Info       map[string]string `json:"info" yaml:"info"`
	Paths      struct{}          `json:"paths" yaml:"paths"`
	Components struct {
		Schemas map[string]openapiSchema `json:"schemas" yaml:"schemas"`
	} `json:"components" yaml:"components"`
}

func NewOnlySchemaOpenapi

func NewOnlySchemaOpenapi(sql ...string) (*OnlySchemaOpenapi, error)

func (*OnlySchemaOpenapi) Enter

func (o *OnlySchemaOpenapi) Enter(in ast.Node) (ast.Node, bool)

func (*OnlySchemaOpenapi) JSON

func (o *OnlySchemaOpenapi) JSON() []byte

func (*OnlySchemaOpenapi) Leave

func (o *OnlySchemaOpenapi) Leave(in ast.Node) (ast.Node, bool)

func (*OnlySchemaOpenapi) Write

func (o *OnlySchemaOpenapi) Write(sql []byte) (int, error)

func (*OnlySchemaOpenapi) WriteString

func (o *OnlySchemaOpenapi) WriteString(sql string) (int, error)

func (*OnlySchemaOpenapi) YAML

func (o *OnlySchemaOpenapi) YAML() []byte

Jump to

Keyboard shortcuts

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