gel

package module
v0.0.0-...-23599b7 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2015 License: MIT Imports: 14 Imported by: 0

README

W.I.P.

Documentation

Index

Constants

View Source
const (
	DEBUG = true
)
View Source
const (
	SQL_EXTENSTION = ".sql"
)

Variables

This section is empty.

Functions

func PQDump

func PQDump(sql string)

Types

type Ast

type Ast struct {
	*FileInfo
	Position int
	Raw      string
	Bytes    []byte
	Source   string
}

func EmptyAstNode

func EmptyAstNode() *Ast

func (*Ast) IsComment

func (node *Ast) IsComment() bool

func (*Ast) IsEmpty

func (node *Ast) IsEmpty() bool

func (*Ast) IsExec

func (node *Ast) IsExec() bool

func (*Ast) IsFunc

func (node *Ast) IsFunc() bool

func (*Ast) IsImFunc

func (node *Ast) IsImFunc() bool

func (*Ast) IsImProc

func (node *Ast) IsImProc() bool

func (*Ast) IsNewLine

func (node *Ast) IsNewLine() bool

func (*Ast) IsProc

func (node *Ast) IsProc() bool

func (*Ast) IsQuery

func (node *Ast) IsQuery() bool

func (*Ast) IsWhiteSpace

func (node *Ast) IsWhiteSpace() bool

func (*Ast) Line

func (node *Ast) Line() string

func (*Ast) Text

func (node *Ast) Text() string

type FileInfo

type FileInfo struct {
	Namespace string
	FileName  string
	Location  string
}

type Parser

type Parser struct {
	CurrentNamespace string
	CurrentState     token.Token
	Scanner          *Scanner
}

func SQLParser

func SQLParser(path string) *Parser

func (*Parser) Ast

func (p *Parser) Ast() []*Ast

func (*Parser) CloseExecKeyWord

func (p *Parser) CloseExecKeyWord(node *Ast)

func (*Parser) CloseFuncKeyWord

func (p *Parser) CloseFuncKeyWord(node *Ast, state string)

func (*Parser) CloseProcKeyWord

func (p *Parser) CloseProcKeyWord(node *Ast, state string)

func (*Parser) CloseStatment

func (p *Parser) CloseStatment(node *Ast)

func (*Parser) Compile

func (p *Parser) Compile()

func (*Parser) CreateSchemaDefinition

func (p *Parser) CreateSchemaDefinition(node *Ast)

func (*Parser) MacroExpandDefault

func (p *Parser) MacroExpandDefault(node *Ast)

func (*Parser) MacroExpandExec

func (p *Parser) MacroExpandExec(node *Ast)

func (*Parser) MacroExpandQuery

func (p *Parser) MacroExpandQuery(node *Ast)

func (*Parser) MacroScopeExpand

func (p *Parser) MacroScopeExpand(node *Ast)

func (*Parser) OpenFuncKeyWord

func (p *Parser) OpenFuncKeyWord(node *Ast)

func (*Parser) OpenImFuncKeyWord

func (p *Parser) OpenImFuncKeyWord(node *Ast)

func (*Parser) OpenImProcKeyWord

func (p *Parser) OpenImProcKeyWord(node *Ast)

func (*Parser) OpenProcKeyWord

func (p *Parser) OpenProcKeyWord(node *Ast)

func (*Parser) Parse

func (p *Parser) Parse()

func (*Parser) State

func (p *Parser) State(s token.Token) bool

type Scanner

type Scanner struct {
	Path   string
	Buffer []*Ast
	Tree   map[string]*Ast
}

func (*Scanner) Load

func (s *Scanner) Load()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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