parser

package
v0.0.0-...-5f37ea0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Select = iota
	CreateFrag
	Insert
	Delete
)

Variables

This section is empty.

Functions

func AnalyseCondition

func AnalyseCondition(con string) []plan.ConditionUnit_

这里有一个问题,PRC这种外面的引号没有加,我省掉了(解决) 水平分片条件没有实现or

Types

type CreateFragStmt_

type CreateFragStmt_ struct {
	TableName string
	SiteName  string
	Fields    []plan.FieldWithInfo
}

type DeleteStmt_

type DeleteStmt_ struct {
	TableName string
}

type InsertStmt_

type InsertStmt_ struct {
	TableName string
	Fields    []string
	Values    []plan.Value_
}

type SelectStmt_

type SelectStmt_ struct {
	Fields         []plan.Field_
	Tables         []string
	ConditionUnits []plan.ConditionUnit_
}

type StmtType_

type StmtType_ int64

type Stmt_

type Stmt_ struct {
	Type           StmtType_
	SelectStmt     *SelectStmt_
	CreateFragStmt *CreateFragStmt_
	InsertStmt     *InsertStmt_
	DeleteStmt     *DeleteStmt_
}

func DDL

func DDL(input string) Stmt_

func Parse

func Parse(input string) Stmt_

目前查询where没有实现or

Jump to

Keyboard shortcuts

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