parser

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2019 License: MIT Imports: 8 Imported by: 13 modules, 36 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

View Source
const Time_YMD = "2006-01-02"
View Source
const Time_YMDHIS = "2006-01-02 15:04:05"

Variables

This section is empty.

Functions

func ExtractDate

func ExtractDate(date string) *time.Time

func New

func New(source string)

Types

type NodeAdapterBinToConst

type NodeAdapterBinToConst struct {
	// contains filtered or unexported fields
}

type NodeAnd

type NodeAnd struct {
	// contains filtered or unexported fields
}

func (*NodeAnd) Assertion

func (n *NodeAnd) Assertion(lvalue string, rvalue string) bool

AND

func (*NodeAnd) LeftValue

func (n *NodeAnd) LeftValue() NodeExpr

func (*NodeAnd) Operator

func (n *NodeAnd) Operator() uint8

func (*NodeAnd) RightValue

func (n *NodeAnd) RightValue() NodeExpr

func (*NodeAnd) SetLeftValue

func (n *NodeAnd) SetLeftValue(e NodeExpr)

func (*NodeAnd) SetRightValue

func (n *NodeAnd) SetRightValue(e NodeExpr)

type NodeBinOp

type NodeBinOp interface {
	LeftValue() NodeExpr
	RightValue() NodeExpr
	SetLeftValue(NodeExpr)
	SetRightValue(NodeExpr)
}

type NodeConst

type NodeConst interface {
	SetValue(string)
}

type NodeEmpty

type NodeEmpty struct {
}

func (*NodeEmpty) Run

func (e *NodeEmpty) Run()

type NodeEqual

type NodeEqual struct {
	// contains filtered or unexported fields
}

func (*NodeEqual) Assertion

func (n *NodeEqual) Assertion(lvalue string, rvalue string) bool

EQUAL

func (*NodeEqual) LeftValue

func (n *NodeEqual) LeftValue() NodeExpr

func (*NodeEqual) Operator

func (n *NodeEqual) Operator() uint8

func (*NodeEqual) RightValue

func (n *NodeEqual) RightValue() NodeExpr

func (*NodeEqual) SetLeftValue

func (n *NodeEqual) SetLeftValue(e NodeExpr)

func (*NodeEqual) SetRightValue

func (n *NodeEqual) SetRightValue(e NodeExpr)

type NodeExpr

type NodeExpr interface {
	Assertion(lvalue, rvalue string) bool
	Operator() uint8
	LeftValue() NodeExpr
	RightValue() NodeExpr
	SetLeftValue(NodeExpr)
	SetRightValue(NodeExpr)
}

type NodeGreater

type NodeGreater struct {
	Equal bool
	// contains filtered or unexported fields
}

func (*NodeGreater) Assertion

func (n *NodeGreater) Assertion(lvalue string, rvalue string) bool

GREATER

func (*NodeGreater) LeftValue

func (n *NodeGreater) LeftValue() NodeExpr

func (*NodeGreater) Operator

func (n *NodeGreater) Operator() uint8

func (*NodeGreater) RightValue

func (n *NodeGreater) RightValue() NodeExpr

func (*NodeGreater) SetLeftValue

func (n *NodeGreater) SetLeftValue(e NodeExpr)

func (*NodeGreater) SetRightValue

func (n *NodeGreater) SetRightValue(e NodeExpr)

type NodeId

type NodeId struct {
	// contains filtered or unexported fields
}

func (*NodeId) Assertion

func (n *NodeId) Assertion(lvalue string, rvalue string) bool

ID

func (*NodeId) LeftValue

func (n *NodeId) LeftValue() NodeExpr

func (*NodeId) Operator

func (n *NodeId) Operator() uint8

func (*NodeId) RightValue

func (n *NodeId) RightValue() NodeExpr

func (*NodeId) SetLeftValue

func (n *NodeId) SetLeftValue(e NodeExpr)

func (*NodeId) SetRightValue

func (n *NodeId) SetRightValue(e NodeExpr)

func (*NodeId) SetValue

func (n *NodeId) SetValue(value string)

func (*NodeId) Value

func (n *NodeId) Value() string

type NodeIn

type NodeIn struct {
	Not bool
	// contains filtered or unexported fields
}

func (*NodeIn) Assertion

func (n *NodeIn) Assertion(lvalue string, rvalue string) bool

func (*NodeIn) LeftValue

func (n *NodeIn) LeftValue() NodeExpr

func (*NodeIn) Operator

func (n *NodeIn) Operator() uint8

func (*NodeIn) RightValue

func (n *NodeIn) RightValue() NodeExpr

func (*NodeIn) SetLeftValue

func (n *NodeIn) SetLeftValue(e NodeExpr)

func (*NodeIn) SetRightValue

func (n *NodeIn) SetRightValue(e NodeExpr)

type NodeLike

type NodeLike struct {
	Pattern *regexp.Regexp
	Not     bool
	// contains filtered or unexported fields
}

func (*NodeLike) Assertion

func (n *NodeLike) Assertion(lvalue string, rvalue string) bool

LIKE

func (*NodeLike) LeftValue

func (n *NodeLike) LeftValue() NodeExpr

func (*NodeLike) Operator

func (n *NodeLike) Operator() uint8

func (*NodeLike) RightValue

func (n *NodeLike) RightValue() NodeExpr

func (*NodeLike) SetLeftValue

func (n *NodeLike) SetLeftValue(e NodeExpr)

func (*NodeLike) SetRightValue

func (n *NodeLike) SetRightValue(e NodeExpr)

type NodeLiteral

type NodeLiteral struct {
	// contains filtered or unexported fields
}

func (*NodeLiteral) Assertion

func (n *NodeLiteral) Assertion(lvalue string, rvalue string) bool

LITERAL

func (*NodeLiteral) LeftValue

func (n *NodeLiteral) LeftValue() NodeExpr

func (*NodeLiteral) Operator

func (n *NodeLiteral) Operator() uint8

func (*NodeLiteral) RightValue

func (n *NodeLiteral) RightValue() NodeExpr

func (*NodeLiteral) SetLeftValue

func (n *NodeLiteral) SetLeftValue(e NodeExpr)

func (*NodeLiteral) SetRightValue

func (n *NodeLiteral) SetRightValue(e NodeExpr)

func (*NodeLiteral) SetValue

func (n *NodeLiteral) SetValue(value string)

func (*NodeLiteral) Value

func (n *NodeLiteral) Value() string

type NodeMain

type NodeMain interface {
	Run()
}

type NodeNotEqual

type NodeNotEqual struct {
	// contains filtered or unexported fields
}

func (*NodeNotEqual) Assertion

func (n *NodeNotEqual) Assertion(lvalue string, rvalue string) bool

NOT EQUAL

func (*NodeNotEqual) LeftValue

func (n *NodeNotEqual) LeftValue() NodeExpr

func (*NodeNotEqual) Operator

func (n *NodeNotEqual) Operator() uint8

func (*NodeNotEqual) RightValue

func (n *NodeNotEqual) RightValue() NodeExpr

func (*NodeNotEqual) SetLeftValue

func (n *NodeNotEqual) SetLeftValue(e NodeExpr)

func (*NodeNotEqual) SetRightValue

func (n *NodeNotEqual) SetRightValue(e NodeExpr)

type NodeNumber

type NodeNumber struct {
	// contains filtered or unexported fields
}

func (*NodeNumber) Assertion

func (n *NodeNumber) Assertion(lvalue string, rvalue string) bool

NUMBER

func (*NodeNumber) LeftValue

func (n *NodeNumber) LeftValue() NodeExpr

func (*NodeNumber) Operator

func (n *NodeNumber) Operator() uint8

func (*NodeNumber) RightValue

func (n *NodeNumber) RightValue() NodeExpr

func (*NodeNumber) SetLeftValue

func (n *NodeNumber) SetLeftValue(e NodeExpr)

func (*NodeNumber) SetRightValue

func (n *NodeNumber) SetRightValue(e NodeExpr)

func (*NodeNumber) SetValue

func (n *NodeNumber) SetValue(value string)

func (*NodeNumber) Value

func (n *NodeNumber) Value() float64

type NodeOr

type NodeOr struct {
	// contains filtered or unexported fields
}

func (*NodeOr) Assertion

func (n *NodeOr) Assertion(lvalue string, rvalue string) bool

OR

func (*NodeOr) LeftValue

func (n *NodeOr) LeftValue() NodeExpr

func (*NodeOr) Operator

func (n *NodeOr) Operator() uint8

func (*NodeOr) RightValue

func (n *NodeOr) RightValue() NodeExpr

func (*NodeOr) SetLeftValue

func (n *NodeOr) SetLeftValue(e NodeExpr)

func (*NodeOr) SetRightValue

func (n *NodeOr) SetRightValue(e NodeExpr)

type NodeOrder

type NodeOrder struct {
	Field string
	Asc   bool
}

type NodeProgram

type NodeProgram struct {
	Child NodeMain
	Path  *string
}

func AST

func AST() (*NodeProgram, error)

type NodeSelect

type NodeSelect struct {
	WildCard bool
	Count    bool
	Fields   []string
	Tables   []string
	Where    NodeExpr
	Order    *NodeOrder
	Limit    int
}

func (*NodeSelect) Run

func (s *NodeSelect) Run()

type NodeSmaller

type NodeSmaller struct {
	Equal bool
	// contains filtered or unexported fields
}

func (*NodeSmaller) Assertion

func (n *NodeSmaller) Assertion(lvalue string, rvalue string) bool

SMALLER

func (*NodeSmaller) LeftValue

func (n *NodeSmaller) LeftValue() NodeExpr

func (*NodeSmaller) Operator

func (n *NodeSmaller) Operator() uint8

func (*NodeSmaller) RightValue

func (n *NodeSmaller) RightValue() NodeExpr

func (*NodeSmaller) SetLeftValue

func (n *NodeSmaller) SetLeftValue(e NodeExpr)

func (*NodeSmaller) SetRightValue

func (n *NodeSmaller) SetRightValue(e NodeExpr)

type SyntaxError

type SyntaxError struct {
	// contains filtered or unexported fields
}

func (*SyntaxError) Error

func (e *SyntaxError) Error() string

Jump to

Keyboard shortcuts

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