gen

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	PrettyCfg tree.PrettyCfg

	// comment out potentially dangerous statements with a warning
	Warnings bool
}

Generator converts cockroachdb tree nodes into strings

func NewGenerator

func NewGenerator() *Generator

NewGenerator configures a generator with sensible defaults

func (*Generator) NewAlterTableAddColumn

func (g *Generator) NewAlterTableAddColumn(col *model.Column) string

func (*Generator) NewAlterTableAddConstraint

func (g *Generator) NewAlterTableAddConstraint(cons *model.Constraint) string

func (*Generator) NewAlterTableAlterColumnDropNotNull

func (g *Generator) NewAlterTableAlterColumnDropNotNull(col *model.Column) string

func (*Generator) NewAlterTableAlterColumnSetNotNull

func (g *Generator) NewAlterTableAlterColumnSetNotNull(col *model.Column) string

func (*Generator) NewAlterTableDropColumn

func (g *Generator) NewAlterTableDropColumn(col *model.Column) string

func (*Generator) NewAlterTableDropConstraint

func (g *Generator) NewAlterTableDropConstraint(cons *model.Constraint) string

func (*Generator) NewCreateIndex

func (g *Generator) NewCreateIndex(idx *model.Index) string

func (*Generator) NewCreateTable

func (g *Generator) NewCreateTable(table *model.Table) string

func (*Generator) NewDropIndex

func (g *Generator) NewDropIndex(idx *model.Index) string

func (*Generator) NewDropTable

func (g *Generator) NewDropTable(table *model.Table) string

Jump to

Keyboard shortcuts

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