ast

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlterTableCmd

type AlterTableCmd struct {
	Subtype   AlterTableType
	Name      *string
	Def       *ColumnDef
	MissingOk bool
}

func (*AlterTableCmd) Pos

func (n *AlterTableCmd) Pos() int

type AlterTableSetSchemaStmt

type AlterTableSetSchemaStmt struct {
	Table     *TableName
	NewSchema *string
}

func (*AlterTableSetSchemaStmt) Pos

func (n *AlterTableSetSchemaStmt) Pos() int

type AlterTableStmt

type AlterTableStmt struct {
	Table *TableName
	Cmds  *List
}

func (*AlterTableStmt) Pos

func (n *AlterTableStmt) Pos() int

type AlterTableType

type AlterTableType int
const (
	AT_AddColumn AlterTableType = iota
	AT_AlterColumnType
	AT_DropColumn
	AT_DropNotNull
	AT_SetNotNull
)

type AlterTypeAddValueStmt added in v1.2.0

type AlterTypeAddValueStmt struct {
	Type               *TypeName
	NewValue           *string
	SkipIfNewValExists bool
}

func (*AlterTypeAddValueStmt) Pos added in v1.2.0

func (n *AlterTypeAddValueStmt) Pos() int

type AlterTypeRenameValueStmt added in v1.2.0

type AlterTypeRenameValueStmt struct {
	Type     *TypeName
	OldValue *string
	NewValue *string
}

func (*AlterTypeRenameValueStmt) Pos added in v1.2.0

func (n *AlterTypeRenameValueStmt) Pos() int

type ColumnDef

type ColumnDef struct {
	Colname   string
	TypeName  *TypeName
	IsNotNull bool
}

TODO: Support array types

func (*ColumnDef) Pos

func (n *ColumnDef) Pos() int

type ColumnRef

type ColumnRef struct {
	Name string
}

func (*ColumnRef) Pos

func (n *ColumnRef) Pos() int

type CommentOnColumnStmt

type CommentOnColumnStmt struct {
	Table   *TableName
	Col     *ColumnRef
	Comment *string
}

func (*CommentOnColumnStmt) Pos

func (n *CommentOnColumnStmt) Pos() int

type CommentOnSchemaStmt

type CommentOnSchemaStmt struct {
	Schema  *String
	Comment *string
}

func (*CommentOnSchemaStmt) Pos

func (n *CommentOnSchemaStmt) Pos() int

type CommentOnTableStmt

type CommentOnTableStmt struct {
	Table   *TableName
	Comment *string
}

func (*CommentOnTableStmt) Pos

func (n *CommentOnTableStmt) Pos() int

type CommentOnTypeStmt

type CommentOnTypeStmt struct {
	Type    *TypeName
	Comment *string
}

func (*CommentOnTypeStmt) Pos

func (n *CommentOnTypeStmt) Pos() int

type CreateEnumStmt

type CreateEnumStmt struct {
	TypeName *TypeName
	Vals     *List
}

func (*CreateEnumStmt) Pos

func (n *CreateEnumStmt) Pos() int

type CreateFunctionStmt

type CreateFunctionStmt struct {
	Replace    bool
	Params     []*FuncParam
	ReturnType *TypeName
	Func       *FuncName
}

func (*CreateFunctionStmt) Pos

func (n *CreateFunctionStmt) Pos() int

type CreateSchemaStmt

type CreateSchemaStmt struct {
	Name        *string
	IfNotExists bool
}

func (*CreateSchemaStmt) Pos

func (n *CreateSchemaStmt) Pos() int

type CreateTableStmt

type CreateTableStmt struct {
	IfNotExists bool
	Name        *TableName
	Cols        []*ColumnDef
}

func (*CreateTableStmt) Pos

func (n *CreateTableStmt) Pos() int

type DropFunctionStmt

type DropFunctionStmt struct {
	Funcs     []*FuncSpec
	MissingOk bool
}

func (*DropFunctionStmt) Pos

func (n *DropFunctionStmt) Pos() int

type DropSchemaStmt

type DropSchemaStmt struct {
	Schemas   []*String
	MissingOk bool
}

func (*DropSchemaStmt) Pos

func (n *DropSchemaStmt) Pos() int

type DropTableStmt

type DropTableStmt struct {
	IfExists bool
	Tables   []*TableName
}

func (*DropTableStmt) Pos

func (n *DropTableStmt) Pos() int

type DropTypeStmt

type DropTypeStmt struct {
	IfExists bool
	Types    []*TypeName
}

func (*DropTypeStmt) Pos

func (n *DropTypeStmt) Pos() int

type FuncName

type FuncName struct {
	Catalog string
	Schema  string
	Name    string
}

func (*FuncName) Pos

func (n *FuncName) Pos() int

type FuncParam

type FuncParam struct {
	Name    *string
	Type    *TypeName
	DefExpr Node // Will always be &ast.TODO
}

func (*FuncParam) Pos

func (n *FuncParam) Pos() int

type FuncSpec

type FuncSpec struct {
	Name    *FuncName
	Args    []*TypeName
	HasArgs bool
}

func (*FuncSpec) Pos

func (n *FuncSpec) Pos() int

type List

type List struct {
	Items []Node
}

func (*List) Pos

func (n *List) Pos() int

type Node

type Node interface {
	Pos() int
}

type RawStmt

type RawStmt struct {
	Stmt Node
}

func (*RawStmt) Pos

func (n *RawStmt) Pos() int

type RenameColumnStmt

type RenameColumnStmt struct {
	Table   *TableName
	Col     *ColumnRef
	NewName *string
}

func (*RenameColumnStmt) Pos

func (n *RenameColumnStmt) Pos() int

type RenameTableStmt

type RenameTableStmt struct {
	Table   *TableName
	NewName *string
}

func (*RenameTableStmt) Pos

func (n *RenameTableStmt) Pos() int

type ResTarget

type ResTarget struct {
	Val Node
}

func (*ResTarget) Pos

func (n *ResTarget) Pos() int

type SelectStmt

type SelectStmt struct {
	Fields *List
	From   *List
}

func (*SelectStmt) Pos

func (n *SelectStmt) Pos() int

type Statement

type Statement struct {
	Raw *RawStmt
}

type String

type String struct {
	Str string
}

func (*String) Pos

func (n *String) Pos() int

type TODO

type TODO struct {
}

func (*TODO) Pos

func (n *TODO) Pos() int

type TableName

type TableName struct {
	Catalog string
	Schema  string
	Name    string
}

func (*TableName) Pos

func (n *TableName) Pos() int

type TypeName

type TypeName struct {
	Catalog string
	Schema  string
	Name    string
}

func (*TypeName) Pos

func (n *TypeName) Pos() int

Jump to

Keyboard shortcuts

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