sqlparser

package
v0.0.0-...-16263d3 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct {
	Migration element.Migration
	// contains filtered or unexported fields
}

Parser ...

func NewParser

func NewParser(dialect sqltemplates.SqlDialect, lowercase, ignoreOrder bool) *Parser

NewParser ...

func (*Parser) Diff

func (p *Parser) Diff(old Parser)

Diff differ between 2 migrations

func (*Parser) Enter

func (p *Parser) Enter(in ast.Node) (ast.Node, bool)

Walk with statements:

DropTableStmt AlterTableStmt DropIndexStmt CreateTableStmt CreateIndexStmt

func (*Parser) HashValue

func (p *Parser) HashValue() int64

HashValue ...

func (*Parser) Leave

func (p *Parser) Leave(in ast.Node) (ast.Node, bool)

Leave ...

func (Parser) MigrationDown

func (p Parser) MigrationDown() string

MigrationDown migration down

func (Parser) MigrationUp

func (p Parser) MigrationUp() string

MigrationUp migration up

func (*Parser) Parser

func (p *Parser) Parser(sql string) error

Parser ...

func (*Parser) ParserMysql

func (p *Parser) ParserMysql(sql string) error

ParserMysql ...

func (*Parser) ParserPostgresql

func (p *Parser) ParserPostgresql(sql string) error

ParserPostgresql ...

func (*Parser) ParserSqlite

func (p *Parser) ParserSqlite(sql string) error

ParserSqlite ...

func (*Parser) Visit

func (p *Parser) Visit(node sqlite.Node) (w sqlite.Visitor, n sqlite.Node, err error)

Walk with statements:

CreateTableStatement CreateIndexStatement DropTableStatement DropIndexStatement AlterTableStatement

sqlite does not support drop column

func (Parser) VisitEnd

func (p Parser) VisitEnd(node sqlite.Node) (sqlite.Node, error)

Jump to

Keyboard shortcuts

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