parser

package
v0.0.0-...-83a45de Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2021 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const END = -1

Variables

View Source
var (
	// A
	ADD            = NewKind("ADD")
	ADMIN          = NewKind("ADMIN")
	ALL            = NewKind("ALL")
	ALGORITHM      = NewKind("ALGORITHM")
	ALTER          = NewKind("ALTER")
	ALWAYS         = NewKind("ALWAYS")
	ANALYTIC       = NewKind("ANALYTIC")
	ANALYZE        = NewKind("ANALYZE")
	AND            = NewKind("AND")
	APPLY          = NewKind("APPLY")
	AS             = NewKind("AS")
	ASC            = NewKind("ASC")
	ATTACH         = NewKind("ATTACH")
	AUTO_INCREMENT = NewKind("AUTO_INCREMENT")
	AVG_ROW_LENGTH = NewKind("AVG_ROW_LENGTH")

	// B
	BETWEEN = NewKind("BETWEEN")
	BITMAP  = NewKind("BITMAP")
	BLOCK   = NewKind("BLOCK")
	BODY    = NewKind("BODY")
	BULK    = NewKind("BULK")
	BTREE   = NewKind("BTREE")
	BY      = NewKind("BY")

	CACHE    = NewKind("CACHE")
	CASCADE  = NewKind("CASCADE")
	CASCADED = NewKind("CASCADED")
	CAST     = NewKind("CAST")

	CHANGE    = NewKind("CHANGE")
	CHARACTER = NewKind("CHARACTER")
	CHARSET   = NewKind("CHARSET")

	CHECK = NewKind("CHECK")

	CHECKSUM = NewKind("CHECKSUM")
	CLUSTER  = NewKind("CLUSTER")

	COALESCE = NewKind("COALESCE")
	COLLATE  = NewKind("COLLATE")
	COLLECT  = NewKind("COLLECT")
	COLUMN   = NewKind("COLUMN")
	COLUMNS  = NewKind("COLUMNS")

	COMMENT     = NewKind("COMMENT")
	COMPILE     = NewKind("COMPILE")
	COMPRESSION = NewKind("COMPRESSION")

	CONNECT         = NewKind("CONNECT")
	CONNECT_BY_ROOT = NewKind("CONNECT_BY_ROOT")
	CONNECTION      = NewKind("CONNECTION")
	CONSTRAINT      = NewKind("CONSTRAINT")
	CONSTRAINTS     = NewKind("CONSTRAINTS")
	CONTAINS        = NewKind("CONTAINS")

	CREATE       = NewKind("CREATE")
	CROSS        = NewKind("CROSS")
	CURRENT      = NewKind("CURRENT")
	CURRENT_ROLE = NewKind("CURRENT_ROLE")
	CURRENT_USER = NewKind("CURRENT_USER")
	CYCLE        = NewKind("CYCLE")

	// D
	DATA      = NewKind("DATA")
	DATABASE  = NewKind("DATABASE")
	DATABASES = NewKind("DATABASES")
	DATE      = NewKind("DATE")
	DATETIME  = NewKind("DATETIME")
	DAY       = NewKind("DAY")

	DEFAULT = NewKind("DEFAULT")

	DELAY_KEY_WRITE = NewKind("DELAY_KEY_WRITE")
	DELAYED         = NewKind("DELAYED")
	DELETE          = NewKind("DELETE")
	DEFINER         = NewKind("DEFINER")

	DESC      = NewKind("DESC")
	DESCRIBE  = NewKind("DESCRIBE")
	DETACH    = NewKind("DETACH")
	DIRECTORY = NewKind("DIRECTORY")
	DISABLE   = NewKind("DISABLE")
	DISCARD   = NewKind("DISCARD")
	DISTINCT  = NewKind("DISTINCT")

	DIV = NewKind("DIV")

	DROP      = NewKind("DROP")
	DUPLICATE = NewKind("DUPLICATE")

	EDITIONABLE = NewKind("EDITIONABLE")
	ENABLE      = NewKind("ENABLE")
	ENCRYPTION  = NewKind("ENCRYPTION")
	ENGINE      = NewKind("ENGINE")
	EMPTY       = NewKind("EMPTY")
	EXCEPT      = NewKind("EXCEPT")
	EXCHANGE    = NewKind("EXCHANGE")
	EXISTS      = NewKind("EXISTS")
	EXPLAIN     = NewKind("EXPLAIN")
	EXTENDED    = NewKind("EXTENDED")
	ESCAPE      = NewKind("ESCAPE")
	EVENT       = NewKind("EVENT")

	// F
	FALSE    = NewKind("FALSE")
	FETCH    = NewKind("FETCH")
	FOR      = NewKind("FOR")
	FORCE    = NewKind("FORCE")
	FOREIGN  = NewKind("FOREIGN")
	FORMAT   = NewKind("FORMAT")
	FROM     = NewKind("FROM")
	FUNCTION = NewKind("FUNCTION")
	FULL     = NewKind("FULL")
	FULLTEXT = NewKind("FULLTEXT")

	// G
	GENERATED = NewKind("GENERATED")
	GLOBAL    = NewKind("GLOBAL")
	GROUP     = NewKind("GROUP")

	// H
	HASH          = NewKind("HASH")
	HAVING        = NewKind("HAVING")
	HELP          = NewKind("HELP")
	HIGH_PRIORITY = NewKind("HIGH_PRIORITY")
	HOST          = NewKind("HOST")
	HOUR          = NewKind("HOUR")

	// I
	IDENTIFIED = NewKind("IDENTIFIED")
	IDENTITY   = NewKind("IDENTITY")
	IF         = NewKind("IF")
	IMPORT     = NewKind("IMPORT")
	IN         = NewKind("IN")

	INCREMENT     = NewKind("INCREMENT")
	INDEX         = NewKind("INDEX")
	INHERIT       = NewKind("INHERIT")
	INFINITE      = NewKind("INFINITE")
	INNER         = NewKind("INNER")
	INOUT         = NewKind("INOUT")
	INTERVAL      = NewKind("INTERVAL")
	INTO          = NewKind("INTO")
	INSERT        = NewKind("INSERT")
	INSERT_METHOD = NewKind("INSERT_METHOD")
	INTERSECT     = NewKind("INTERSECT")
	INVISIBLE     = NewKind("INVISIBLE")
	IGNORE        = NewKind("IGNORE")
	IS            = NewKind("IS")

	// J
	JOIN = NewKind("JOIN")

	// K
	KEEP           = NewKind("KEEP")
	KEY            = NewKind("KEY")
	KEY_BLOCK_SIZE = NewKind("KEY_BLOCK_SIZE")

	// L
	LANGUAGE     = NewKind("LANGUAGE")
	LATERAL      = NewKind("LATERAL")
	LEFT         = NewKind("LEFT")
	LESS         = NewKind("LESS")
	LINEAR       = NewKind("LINEAR")
	LIMIT        = NewKind("LIMIT")
	LIKE         = NewKind("LIKE")
	LIKEC        = NewKind("LIKEC")
	LIKE2        = NewKind("LIKE2")
	LIKE4        = NewKind("LIKE4")
	LIST         = NewKind("LIST")
	LOCAL        = NewKind("LOCAL")
	LOCK         = NewKind("LOCK")
	LOCKED       = NewKind("LOCKED")
	LOW_PRIORITY = NewKind("LOW_PRIORITY")

	// M
	MATERIALIZED = NewKind("MATERIALIZED")
	MAX_ROWS     = NewKind("MAX_ROWS")
	MAXVALUE     = NewKind("MAXVALUE")

	MIN_ROWS = NewKind("MIN_ROWS")
	MINUS    = NewKind("MINUS")
	MINUTE   = NewKind("MINUTE")
	MINVALUE = NewKind("MINVALUE")
	MOD      = NewKind("MOD")
	MODE     = NewKind("MODE")
	MODEL    = NewKind("MODEL")
	MODIFIES = NewKind("MODIFIES")
	MODIFY   = NewKind("MODIFY")
	MONTH    = NewKind("MONTH")

	// N
	NAMES   = NewKind("NAMES")
	NAN     = NewKind("NAN")
	NATURAL = NewKind("NATURAL")
	NO      = NewKind("NO")

	NOCACHE = NewKind("NOCACHE")
	NOCYCLE = NewKind("NOCYCLE")
	NOKEEP  = NewKind("NOKEEP")

	NOMAXVALUE     = NewKind("NOMAXVALUE")
	NOMINVALUE     = NewKind("NOMINVALUE")
	NONEDITIONABLE = NewKind("NONEDITIONABLE")
	NOORDER        = NewKind("NOORDER")
	NORELY         = NewKind("NORELY")
	NOSCALE        = NewKind("NOSCALE")
	NOT            = NewKind("NOT")
	NOWAIT         = NewKind("NOWAIT")

	NULL = NewKind("NULL")

	// O
	OF       = NewKind("OF")
	OFFSET   = NewKind("OFFSET")
	OJ       = NewKind("OJ")
	ON       = NewKind("ON")
	ONLY     = NewKind("ONLY")
	OPTIMIZE = NewKind("OPTIMIZE")
	OPTION   = NewKind("OPTION")
	OPTIONS  = NewKind("OPTIONS")
	OR       = NewKind("OR")
	ORDER    = NewKind("ORDER")
	OUT      = NewKind("OUT")
	OUTER    = NewKind("OUTER")
	OWNER    = NewKind("OWNER")

	// P
	PACKAGE      = NewKind("PACKAGE")
	PACK_KEYS    = NewKind("PACK_KEYS")
	PARTITION    = NewKind("PARTITION")
	PARTITIONS   = NewKind("PARTITIONS")
	PASSWORD     = NewKind("PASSWORD")
	PERSIST      = NewKind("PERSIST")
	PERSIST_ONLY = NewKind("PERSIST_ONLY")
	PLAN         = NewKind("PLAN")
	PORT         = NewKind("PORT")
	PRIMARY      = NewKind("PRIMARY")
	PRIOR        = NewKind("PRIOR")
	PROCEDURE    = NewKind("PROCEDURE")
	PUBLIC       = NewKind("PUBLIC")

	// Q
	QUICK = NewKind("QUICK")

	// R
	RANDOM = NewKind("RANDOM")
	RANGE  = NewKind("RANGE")
	READ   = NewKind("READ")
	READS  = NewKind("READS")

	REBUILD    = NewKind("REBUILD")
	RECURSIVE  = NewKind("RECURSIVE")
	REF        = NewKind("REF")
	REFERENCES = NewKind("REFERENCES")

	REGEXP      = NewKind("REGEXP")
	REGEXP_LIKE = NewKind("REGEXP_LIKE")
	RELY        = NewKind("RELY")
	REMOVE      = NewKind("REMOVE")
	RENAME      = NewKind("RENAME")
	REPAIR      = NewKind("REPAIR")
	REPLACE     = NewKind("REPLACE")
	REPLICA     = NewKind("REPLICA")
	RESET       = NewKind("RESET")
	RESTRICT    = NewKind("RESTRICT")
	RESULT      = NewKind("RESULT")
	RETURN      = NewKind("RETURN")
	RETURNING   = NewKind("RETURNING")
	RETURNS     = NewKind("RETURNS")

	RIGHT      = NewKind("RIGHT")
	ROLE       = NewKind("ROLE")
	ROW_FORMAT = NewKind("ROW_FORMAT")

	// S
	SAMPLE   = NewKind("SAMPLE")
	SCALE    = NewKind("SCALE")
	SCOPE    = NewKind("SCOPE")
	SCHEMA   = NewKind("SCHEMA")
	SECOND   = NewKind("SECOND")
	SECURITY = NewKind("SECURITY")
	SEED     = NewKind("SEED")
	SELECT   = NewKind("SELECT")
	SEQUENCE = NewKind("SEQUENCE")

	SERVER  = NewKind("SERVER")
	SESSION = NewKind("SESSION")
	SET     = NewKind("SET")

	SHARE   = NewKind("SHARE")
	SHARING = NewKind("SHARING")
	SHOW    = NewKind("SHOW")
	SKIP    = NewKind("SKIP")
	SOCKET  = NewKind("SOCKET")
	SORT    = NewKind("SORT")
	SPATIAL = NewKind("SPATIAL")
	SQL     = NewKind("SQL")
	START   = NewKind("START")

	STATEMENT_ID       = NewKind("STATEMENT_ID")
	STATS_AUTO_RECALC  = NewKind("STATS_AUTO_RECALC")
	STATS_PERSISTENT   = NewKind("STATS_PERSISTENT")
	STATS_SAMPLE_PAGES = NewKind("STATS_SAMPLE_PAGES")
	STORAGE            = NewKind("STORAGE")
	STRAIGHT_JOIN      = NewKind("STRAIGHT_JOIN")

	SUBPARTITION  = NewKind("SUBPARTITION")
	SUBPARTITIONS = NewKind("SUBPARTITIONS")

	SYNONYM = NewKind("SYNONYM")

	// T
	TABLE      = NewKind("TABLE")
	TABLESPACE = NewKind("TABLESPACE")
	TEMPORARY  = NewKind("TEMPORARY")
	TIME       = NewKind("TIME")
	TIMESTAMP  = NewKind("TIMESTAMP")
	THAN       = NewKind("THAN")
	TO         = NewKind("TO")
	TRIGGER    = NewKind("TRIGGER")
	TRUE       = NewKind("TRUE")
	TRUNCATE   = NewKind("TRUNCATE")
	TYPE       = NewKind("TYPE")

	// U
	UNION   = NewKind("UNION")
	UNIQUE  = NewKind("UNIQUE")
	UNKNOWN = NewKind("UNKNOWN")
	UNNEST  = NewKind("UNNEST")
	UPDATE  = NewKind("UPDATE")
	USE     = NewKind("USE")
	USER    = NewKind("USER")
	USING   = NewKind("USING")

	// V
	VALIDATE = NewKind("VALIDATE")
	VALUE    = NewKind("VALUE")
	VALUES   = NewKind("VALUES")
	VIEW     = NewKind("VIEW")
	VISIBLE  = NewKind("VISIBLE")

	// W
	WAIT = NewKind("WAIT")

	WHERE   = NewKind("WHERE")
	WITH    = NewKind("WITH")
	WRAPPER = NewKind("WRAPPER")
	WRITE   = NewKind("WRITE")

	// X
	// Y
	YEAR = NewKind("YEAR")

	// Identifier
	IDENTIFIER               = NewKind("IDENTIFIER")
	IDENTIFIER_DOUBLE_QUOTE  = NewKind("IDENTIFIER_DOUBLE_QUOTE")
	IDENTIFIER_REVERSE_QUOTE = NewKind("IDENTIFIER_REVERSE_QUOTE")

	// Literal
	LITERAL_STRING         = NewKind("LITERAL_STRING")
	LITERAL_INTEGER        = NewKind("LITERAL_INTEGER")
	LITERAL_FLOATING_POINT = NewKind("LITERAL_FLOATING_POINT")
	LITERAL_HEXADECIMAL_X  = NewKind("LITERAL_HEXADECIMAL_X")
	LITERAL_HEXADECIMAL_0X = NewKind("LITERAL_HEXADECIMAL_0X")
	LITERAL_DATETIME       = NewKind("LITERAL_DATETIME")
	LITERAL_INTERVAL       = NewKind("LITERAL_INTERVAL")
	LITERAL_NULL           = NewKind("LITERAL_NULL")

	// Operators
	// Operators. Assigns
	// :=
	SYMB_COLON_EQUAL = NewKind(":=")
	// +=
	SYMB_PLUS_EQUAL = NewKind("+=")
	// -=
	SYMB_MINUS_EQUAL = NewKind("-=")
	// *=
	SYMB_MULT_EQUAL = NewKind("*=")
	// /=
	SYMB_DIV_EQUAL = NewKind("/=")

	// %=
	SYMB_MOD_EQUAL = NewKind("%=")

	// &=
	SYMB_AND_EQUAL = NewKind("INTERSECT")

	// ^=
	SYMB_XOR_EQUAL = NewKind("^=")

	// |=
	SYMB_OR_EQUAL = NewKind("|=")

	// Operators. Arithmetics
	// +
	SYMB_PLUS = NewKind("+")

	// -
	SYMB_MINUS = NewKind("-")
	// *
	SYMB_STAR = NewKind("*")

	// /
	SYMB_SLASH = NewKind("/")

	// %
	SYMB_PERCENT = NewKind("%")

	// --
	SYMB_MINUSMINUS = NewKind("--")

	// Operators. Comparation
	// =
	SYMB_EQUAL = NewKind("=")

	// =>
	SYMB_EQUAL_GREATER_THAN = NewKind("=>")

	// >
	SYMB_GREATER_THAN = NewKind(">")

	// >>
	SYMB_GREATER_THAN_GREATER_THAN = NewKind(">>")
	// >=
	SYMB_GREATER_THAN_EQUAL = NewKind(">=")

	// <
	SYMB_LESS_THAN = NewKind("<")
	// <<
	SYMB_LESS_THAN_LESS_THAN = NewKind("<<")
	// <=
	SYMB_LESS_THAN_EQUAL = NewKind("<=")

	// !
	SYMB_EXCLAMATION = NewKind("!")
	// !=
	SYMB_EXCLAMATION_EQUAL = NewKind("!=")
	// <>
	SYMB_LESS_THAN_GREATER_THAN = NewKind("<>")

	// <=>
	SYMB_LESS_THAN_EQUAL_GREATER_THAN = NewKind("<>")

	// ~=
	SYMB_NOT_EQUAL = NewKind("~=")

	// Operators. Bit
	// ~
	SYMB_BIT_NOT = NewKind("~")
	// |
	SYMB_BIT_OR = NewKind("|")
	// &
	SYMB_BIT_AND = NewKind("&")
	// ^
	SYMB_BIT_XOR = NewKind("^")

	// Constructors symbols
	// .
	SYMB_DOT = NewKind(".")
	// @
	SYMB_AT       = NewKind("@")
	SYMB_QUESTION = NewKind("?")

	// (
	SYMB_LEFT_PAREN = NewKind("(")
	// )
	SYMB_RIGHT_PAREN = NewKind(")")
	// [
	SYMB_LERT_BRACKET = NewKind("[")
	// ]
	SYMB_RIGHT_BRACKET = NewKind("]")
	// {
	SYMB_LERT_BRACE = NewKind("{")
	// }
	SYMB_RIGHT_BRACE = NewKind("}")

	// ,
	SYMB_COMMA = NewKind(",")
	// ;
	SYMB_SEMI = NewKind(";")

	// :
	SYMB_COLON = NewKind(":")
	// _
	SYMB_INTRODUCER = NewKind("_")

	// ||
	SYMB_LOGICAL_OR = NewKind("||")
	// &&
	SYMB_LOGICAL_AND = NewKind("&&")

	// Comment
	COMMENT_MINUS           = NewKind("-- comment")
	COMMENT_MULTI_LINE      = NewKind("/* comment */")
	COMMENT_SHARP           = NewKind("# comment")
	COMMENT_MULTI_LINE_HINT = NewKind("/*+ hint */")

	EOF = NewKind("EOF")
)
View Source
var KindMap = make(map[string]*Kind)

Functions

func AddAfterComments

func AddAfterComments(sp ISQLParser, object ast.ISQLObject)

func AddBeforeComments

func AddBeforeComments(sp ISQLParser, object ast.ISQLObject)

func CanScanNumeric

func CanScanNumeric(lexer *SQLLexer, ch rune) bool

func ClearComments

func ClearComments(comments []ast.ISQLComment) []ast.ISQLComment

func IsDigit

func IsDigit(ch rune) bool

func IsHexadecimal

func IsHexadecimal(ch rune) bool

func IsIdentifier

func IsIdentifier(kind *Kind) bool

func IsSelect

func IsSelect(sp ISQLExprParser) bool

func IsWhitespace

func IsWhitespace(ch rune) bool

func NewAbstractSQLDDLStatementParserByExprParser

func NewAbstractSQLDDLStatementParserByExprParser(exprParser ISQLExprParser) *abstractSQLDDLStatementParser

func NextToken

func NextToken(lexer ISQLLexer)

func NextTokenByParser

func NextTokenByParser(parser ISQLParser)

func ParseAlterDatabaseStatement

func ParseAlterDatabaseStatement(x ISQLExprParser) statement.ISQLStatement

func ParseAlterFunctionStatement

func ParseAlterFunctionStatement(x ISQLExprParser) statement.ISQLStatement

func ParseAlterIndexStatement

func ParseAlterIndexStatement(x ISQLExprParser) statement.ISQLStatement

func ParseAlterPackageBodyStatement

func ParseAlterPackageBodyStatement(x ISQLExprParser) statement.ISQLStatement

func ParseAlterPackageStatement

func ParseAlterPackageStatement(x ISQLExprParser) statement.ISQLStatement

func ParseAlterProcedureStatement

func ParseAlterProcedureStatement(x ISQLExprParser) statement.ISQLStatement

func ParseAlterRoleStatement

func ParseAlterRoleStatement(x ISQLExprParser) statement.ISQLStatement

func ParseAlterSchemaStatement

func ParseAlterSchemaStatement(x ISQLExprParser) statement.ISQLStatement

func ParseAlterSequenceStatement

func ParseAlterSequenceStatement(x ISQLExprParser) statement.ISQLStatement

func ParseAlterServerStatement

func ParseAlterServerStatement(x ISQLExprParser) statement.ISQLStatement

func ParseAlterStatement

func ParseAlterStatement(x ISQLExprParser) statement.ISQLStatement

func ParseAlterSynonymStatement

func ParseAlterSynonymStatement(x ISQLExprParser) statement.ISQLStatement

func ParseAlterTableStatement

func ParseAlterTableStatement(x ISQLExprParser) statement.ISQLStatement

func ParseAlterTriggerStatement

func ParseAlterTriggerStatement(x ISQLExprParser) statement.ISQLStatement

func ParseAlterTypeBodyStatement

func ParseAlterTypeBodyStatement(x ISQLExprParser) statement.ISQLStatement

func ParseAlterTypeStatement

func ParseAlterTypeStatement(x ISQLExprParser) statement.ISQLStatement

func ParseAlterUserStatement

func ParseAlterUserStatement(x ISQLExprParser) statement.ISQLStatement

func ParseAlterViewStatement

func ParseAlterViewStatement(x ISQLExprParser) statement.ISQLStatement

func ParseAssignExpr

func ParseAssignExpr(child ISQLExprParser) *expr.SQLAssignExpr

*

  • name [=] value

func ParseCommentOnColumnStatement

func ParseCommentOnColumnStatement(x ISQLExprParser) statement.ISQLStatement

func ParseCommentOnMaterializedViewStatement

func ParseCommentOnMaterializedViewStatement(x ISQLExprParser) statement.ISQLStatement

func ParseCommentOnTableStatement

func ParseCommentOnTableStatement(x ISQLExprParser) statement.ISQLStatement

func ParseCommentStatement

func ParseCommentStatement(x ISQLExprParser) statement.ISQLStatement

func ParseCreateDatabaseStatement

func ParseCreateDatabaseStatement(x ISQLExprParser) statement.ISQLStatement

func ParseCreateFunctionStatement

func ParseCreateFunctionStatement(x ISQLExprParser) statement.ISQLStatement

func ParseCreateIndexStatement

func ParseCreateIndexStatement(x ISQLExprParser) statement.ISQLStatement

func ParseCreatePackageBodyStatement

func ParseCreatePackageBodyStatement(x ISQLExprParser) statement.ISQLStatement

func ParseCreatePackageStatement

func ParseCreatePackageStatement(x ISQLExprParser) statement.ISQLStatement

func ParseCreateProcedureStatement

func ParseCreateProcedureStatement(x ISQLExprParser) statement.ISQLStatement

func ParseCreateRoleStatement

func ParseCreateRoleStatement(x ISQLExprParser) statement.ISQLStatement

func ParseCreateSchemaStatement

func ParseCreateSchemaStatement(x ISQLExprParser) statement.ISQLStatement

func ParseCreateSequenceStatement

func ParseCreateSequenceStatement(x ISQLExprParser) statement.ISQLStatement

func ParseCreateServerStatement

func ParseCreateServerStatement(x ISQLExprParser) statement.ISQLStatement

func ParseCreateStatement

func ParseCreateStatement(x ISQLExprParser) statement.ISQLStatement

func ParseCreateSynonymStatement

func ParseCreateSynonymStatement(x ISQLExprParser) statement.ISQLStatement

func ParseCreateTableStatement

func ParseCreateTableStatement(x ISQLExprParser) statement.ISQLStatement

func ParseCreateTriggerStatement

func ParseCreateTriggerStatement(x ISQLExprParser) statement.ISQLStatement

func ParseCreateTypeBodyStatement

func ParseCreateTypeBodyStatement(x ISQLExprParser) statement.ISQLStatement

func ParseCreateTypeStatement

func ParseCreateTypeStatement(x ISQLExprParser) statement.ISQLStatement

func ParseCreateUserStatement

func ParseCreateUserStatement(x ISQLExprParser) statement.ISQLStatement

func ParseCreateViewStatement

func ParseCreateViewStatement(x ISQLExprParser) statement.ISQLStatement

func ParseDataType

func ParseDataType(sp ISQLExprParser) datatype.ISQLDataType

func ParseDescStatement

func ParseDescStatement(sp ISQLExprParser) statement.ISQLStatement

func ParseDescribeStatement

func ParseDescribeStatement(sp ISQLExprParser) statement.ISQLStatement

func ParseDropDatabaseStatement

func ParseDropDatabaseStatement(x ISQLExprParser) statement.ISQLStatement

func ParseDropFunctionStatement

func ParseDropFunctionStatement(x ISQLExprParser) statement.ISQLStatement

func ParseDropIndexStatement

func ParseDropIndexStatement(x ISQLExprParser) statement.ISQLStatement

func ParseDropPackageBodyStatement

func ParseDropPackageBodyStatement(x ISQLExprParser) statement.ISQLStatement

func ParseDropPackageStatement

func ParseDropPackageStatement(x ISQLExprParser) statement.ISQLStatement

func ParseDropProcedureStatement

func ParseDropProcedureStatement(x ISQLExprParser) statement.ISQLStatement

func ParseDropRoleStatement

func ParseDropRoleStatement(x ISQLExprParser) statement.ISQLStatement

func ParseDropSchemaStatement

func ParseDropSchemaStatement(x ISQLExprParser) statement.ISQLStatement

func ParseDropSequenceStatement

func ParseDropSequenceStatement(x ISQLExprParser) statement.ISQLStatement

func ParseDropServerStatement

func ParseDropServerStatement(x ISQLExprParser) statement.ISQLStatement

func ParseDropStatement

func ParseDropStatement(x ISQLExprParser) statement.ISQLStatement

func ParseDropSynonymStatement

func ParseDropSynonymStatement(x ISQLExprParser) statement.ISQLStatement

func ParseDropTableStatement

func ParseDropTableStatement(x ISQLExprParser) statement.ISQLStatement

func ParseDropTriggerStatement

func ParseDropTriggerStatement(x ISQLExprParser) statement.ISQLStatement

func ParseDropTypeBodyStatement

func ParseDropTypeBodyStatement(x ISQLExprParser) statement.ISQLStatement

func ParseDropTypeStatement

func ParseDropTypeStatement(x ISQLExprParser) statement.ISQLStatement

func ParseDropUserStatement

func ParseDropUserStatement(x ISQLExprParser) statement.ISQLStatement

func ParseDropViewStatement

func ParseDropViewStatement(x ISQLExprParser) statement.ISQLStatement

func ParseExplainStatement

func ParseExplainStatement(sp ISQLExprParser) statement.ISQLStatement

func ParseExpr

func ParseExpr(sp ISQLExprParser) expr.ISQLExpr

*

  • expr

func ParseFrom

func ParseFrom(sp ISQLExprParser) *select_.SQLFromClause

func ParseHelpStatement

func ParseHelpStatement(sp ISQLExprParser) statement.ISQLStatement

func ParseHierarchicalQueryClause

func ParseHierarchicalQueryClause(sp ISQLExprParser) select_.ISQLHierarchicalQueryClause

*

  • { CONNECT BY [ NOCYCLE ] condition [ START WITH condition ]

| START WITH condition CONNECT BY [ NOCYCLE ] condition }

func ParseIReturningClause

func ParseIReturningClause(sp ISQLExprParser) select_.ISQLReturningClause

*

func ParseIfExists

func ParseIfExists(x ISQLExprParser) bool

func ParseIfNotExists

func ParseIfNotExists(x ISQLExprParser) bool

------------------------------------------------------ DDL -------------------------------------------------- --------------------------- Element --------------------------------------------------

func ParseIntervalDataType

func ParseIntervalDataType(sp ISQLExprParser) *datatype.SQLIntervalDataType

func ParseIntervalLiteral

func ParseIntervalLiteral(sp ISQLExprParser) *literal.SQLIntervalLiteral

func ParseJoinConditions

func ParseJoinConditions(sp ISQLExprParser, x *select_.SQLJoinTableReference)

func ParseLikeClause

func ParseLikeClause(p ISQLExprParser) *table.SQLTableLikeClause

func ParseLimitClause

func ParseLimitClause(sp ISQLExprParser) select_.ISQLLimitClause

func ParseMinusComment

func ParseMinusComment(x ISQLExprParser) *ast.SQLMinusComment

func ParseMultiLineComment

func ParseMultiLineComment(x ISQLExprParser) *ast.SQLMultiLineComment

func ParseName

func ParseName(x ISQLExprParser) expr.ISQLName

*

  • E: T.T.T
  • T: ID

func ParseOrReplace

func ParseOrReplace(x ISQLExprParser) bool

func ParseOrderByClause

func ParseOrderByClause(parser ISQLExprParser) *select_.SQLOrderByClause

func ParseOrderByElement

func ParseOrderByElement(sp ISQLExprParser) *select_.SQLOrderByElement

func ParsePrimaryExpr

func ParsePrimaryExpr(sp ISQLExprParser) expr.ISQLExpr

func ParsePrimaryQueryBlock

func ParsePrimaryQueryBlock(sp ISQLExprParser) select_.ISQLSelectQuery

func ParsePrimaryTableReference

func ParsePrimaryTableReference(sp ISQLExprParser) select_.ISQLTableReference

*

func ParseQueryBlock

func ParseQueryBlock(sp ISQLExprParser) select_.ISQLSelectQuery

func ParseSelectElement

func ParseSelectElement(sp ISQLExprParser) *select_.SQLSelectElement

func ParseSelectElements

func ParseSelectElements(sp ISQLExprParser, parent *select_.SQLSelectQuery)

func ParseSelectQuery

func ParseSelectQuery(sp ISQLExprParser) select_.ISQLSelectQuery

*

  • Select

func ParseSelectStatement

func ParseSelectStatement(x ISQLExprParser) statement.ISQLStatement

func ParseSelectTargetElements

func ParseSelectTargetElements(parser ISQLExprParser, parent *select_.SQLSelectQuery)

func ParseSetCharacterSetStatement

func ParseSetCharacterSetStatement(sp ISQLExprParser) statement.ISQLStatement

func ParseSetCharsetStatement

func ParseSetCharsetStatement(sp ISQLExprParser) statement.ISQLStatement

func ParseSetNamesStatement

func ParseSetNamesStatement(sp ISQLExprParser) statement.ISQLStatement

func ParseSetStatement

func ParseSetStatement(sp ISQLExprParser) statement.ISQLStatement

func ParseSetVariableAssignmentStatement

func ParseSetVariableAssignmentStatement(sp ISQLExprParser) statement.ISQLStatement

func ParseSharpComment

func ParseSharpComment(x ISQLExprParser) *ast.SQLSharpComment

func ParseShowCreateDatabaseStatement

func ParseShowCreateDatabaseStatement(sp ISQLExprParser) statement.ISQLStatement

func ParseShowCreateEventStatement

func ParseShowCreateEventStatement(sp ISQLExprParser) statement.ISQLStatement

func ParseShowCreateFunctionStatement

func ParseShowCreateFunctionStatement(sp ISQLExprParser) statement.ISQLStatement

func ParseShowCreateProcedureStatement

func ParseShowCreateProcedureStatement(sp ISQLExprParser) statement.ISQLStatement

func ParseShowCreateTableStatement

func ParseShowCreateTableStatement(sp ISQLExprParser) statement.ISQLStatement

func ParseShowCreateTriggerStatement

func ParseShowCreateTriggerStatement(sp ISQLExprParser) statement.ISQLStatement

func ParseShowCreateViewStatement

func ParseShowCreateViewStatement(sp ISQLExprParser) statement.ISQLStatement

func ParseShowDatabasesStatement

func ParseShowDatabasesStatement(sp ISQLExprParser) statement.ISQLStatement

func ParseShowStatement

func ParseShowStatement(sp ISQLExprParser) statement.ISQLStatement

func ParseStatements

func ParseStatements(parser ISQLStatementParser) []statement.ISQLStatement

func ParseStatementsWithParent

func ParseStatementsWithParent(x ISQLStatementParser, parent ast.ISQLObject) []statement.ISQLStatement

func ParseSubQueryExpr

func ParseSubQueryExpr(child ISQLExprParser) *common.SQLSubQueryExpr

func ParseTableElements

func ParseTableElements(sp ISQLExprParser) []table.ISQLTableElement

--------------------------- OnTable -------------------------------------------------- * * ( * TableElements * )

func ParseTableReference

func ParseTableReference(sp ISQLExprParser) select_.ISQLTableReference

*

  • E: T (JOIN, COMM) T JOIN T
  • T: primary

func ParseUseStatement

func ParseUseStatement(sp ISQLExprParser) statement.ISQLStatement

func ParseViewElements

func ParseViewElements(sp ISQLExprParser) []view.ISQLViewElement

--------------------------- View --------------------------------------------------

func ParseWhereClause

func ParseWhereClause(sp ISQLExprParser) *select_.SQLWhereClause

Types

type Error

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

func NewError

func NewError(line int, col int, message string) *Error

func (*Error) Error

func (error *Error) Error() string

type ISQLCommentStatementParser

type ISQLCommentStatementParser interface {
	ISQLStatementParser
	Parse() statement.ISQLStatement
}

------------------------ COMMENT ------------------------

type ISQLDDLStatementParser

type ISQLDDLStatementParser interface {
	ISQLStatementParser
	ParseAlter() statement.ISQLStatement
	ParseCreate() statement.ISQLStatement
	ParseDrop() statement.ISQLStatement
}

type ISQLDatabaseStatementParser

type ISQLDatabaseStatementParser interface {
	ISQLDDLStatementParser
}

type ISQLDeleteStatementParser

type ISQLDeleteStatementParser interface {
	ISQLStatementParser
	Parse() statement.ISQLStatement
}

type ISQLExplainStatementParser

type ISQLExplainStatementParser interface {
	ISQLStatementParser
	Parse() statement.ISQLStatement
}

--------------------------- EXPLAIN Statement Start ---------------------------

type ISQLExprParser

type ISQLExprParser interface {
	ISQLParser

	CreateSQLCommentOnAuditPolicyStatementParser() ISQLCommentStatementParser
	CreateSQLCommentOnColumnStatementParser() ISQLCommentStatementParser
	CreateSQLCommentOnEditionStatementParser() ISQLCommentStatementParser
	CreateSQLCommentOnIndextypeStatementParser() ISQLCommentStatementParser
	CreateSQLCommentOnMaterializedViewStatementParser() ISQLCommentStatementParser
	CreateSQLCommentOnMiningModelStatementParser() ISQLCommentStatementParser
	CreateSQLCommentOnOperatorStatementParser() ISQLCommentStatementParser
	CreateSQLCommentOnTableStatementParser() ISQLCommentStatementParser

	CreateSQLDatabaseStatementParser() ISQLDatabaseStatementParser
	CreateSQLFunctionStatementParser() ISQLFunctionStatementParser
	CreateSQLIndexStatementParser() ISQLIndexStatementParser
	CreateSQLPackageStatementParser() ISQLPackageStatementParser
	CreateSQLPackageBodyStatementParser() ISQLPackageBodyStatementParser
	CreateSQLProcedureStatementParser() ISQLProcedureStatementParser
	CreateSQLRoleStatementParser() ISQLRoleStatementParser
	CreateSQLSchemaStatementParser() ISQLSchemaStatementParser
	CreateSQLSequenceStatementParser() ISQLSequenceStatementParser
	CreateSQLServerStatementParser() ISQLServerStatementParser
	CreateSQLSynonymStatementParser() ISQLSynonymStatementParser
	CreateSQLTableStatementParser() ISQLTableStatementParser
	CreateSQLTriggerStatementParser() ISQLTriggerStatementParser
	CreateSQLTypeStatementParser() ISQLTypeStatementParser
	CreateSQLTypeBodyStatementParser() ISQLTypeBodyStatementParser
	CreateSQLUserStatementParser() ISQLUserStatementParser
	CreateSQLViewStatementParser() ISQLViewStatementParser

	CreateSQLDeleteStatementParser() ISQLDeleteStatementParser
	CreateSQLInsertStatementParser() ISQLInsertStatementParser
	CreateSQLSelectStatementParser() ISQLSelectStatementParser
	CreateSQLUpdateStatementParser() ISQLUpdateStatementParser

	CreateSQLSetVariableAssignmentStatementParser() ISQLSetStatementParser
	CreateSQLSetCharacterSetStatementParser() ISQLSetStatementParser
	CreateSQLSetCharsetStatementParser() ISQLSetStatementParser
	CreateSQLSetNamesStatementParser() ISQLSetStatementParser

	CreateSQLShowCreateDatabaseStatementParser() ISQLShowStatementParser
	CreateSQLShowCreateEventStatementParser() ISQLShowStatementParser
	CreateSQLShowCreateFunctionStatementParser() ISQLShowStatementParser
	CreateSQLShowCreateProcedureStatementParser() ISQLShowStatementParser
	CreateSQLShowCreateTableStatementParser() ISQLShowStatementParser
	CreateSQLShowCreateTriggerStatementParser() ISQLShowStatementParser
	CreateSQLShowCreateViewStatementParser() ISQLShowStatementParser

	CreateSQLShowDatabasesStatementParser() ISQLShowStatementParser

	CreateSQLDescStatementParser() ISQLExplainStatementParser
	CreateSQLDescribeStatementParser() ISQLExplainStatementParser
	CreateSQLExplainStatementParser() ISQLExplainStatementParser

	CreateSQLHelpStatementParser() ISQLHelpStatementParser
	CreateSQLUseStatementParser() ISQLUseStatementParser

	ParseComments(child ISQLExprParser) []ast.ISQLComment

	IsComplexFunction(name string) bool
	ParseComplexFunction(child ISQLExprParser, name expr.ISQLExpr) expr.ISQLExpr

	IsNonParametricFunction(name string) bool
	ParseNonParametricFunction(child ISQLExprParser, name expr.ISQLExpr) expr.ISQLExpr

	ParseIdentifier(child ISQLExprParser) expr.ISQLIdentifier
	ParseNameRest(child ISQLExprParser, owner expr.ISQLName) expr.ISQLName

	ParseExprRest(child ISQLExprParser, left expr.ISQLExpr) expr.ISQLExpr
	ParsePrimaryExprRest(child ISQLExprParser, left expr.ISQLExpr) expr.ISQLExpr

	ParseAtExpr(child ISQLExprParser) expr.ISQLExpr
	ParseOuterJoinExprRest(x expr.ISQLExpr) (expr.ISQLExpr, bool)
	ParseCallExpr(child ISQLExprParser, name expr.ISQLExpr) expr.ISQLExpr

	IsParseLikeCondition() bool
	ParseLikeConditionRest(child ISQLExprParser, not bool, left expr.ISQLExpr) expr.ISQLExpr
	ParseRegexpConditionRest(child ISQLExprParser, not bool, left expr.ISQLExpr) expr.ISQLExpr
	ParseBetweenConditionRest(child ISQLExprParser, not bool, left expr.ISQLExpr) expr.ISQLExpr
	ParseInConditionRest(child ISQLExprParser, not bool, left expr.ISQLExpr) expr.ISQLExpr

	ParseDateDataType(child ISQLExprParser) datatype.ISQLDataType
	ParseDateTimeDataType(child ISQLExprParser) datatype.ISQLDataType
	ParseTimeDataType(child ISQLExprParser) datatype.ISQLDataType
	ParseTimestampDataType(child ISQLExprParser) datatype.ISQLDataType

	// --------------------------------------------- DDL --------------------------------------------------------
	// ------------------- Statement ---------------
	// ------------ Delete
	ParseDeleteStatement(child ISQLExprParser) statement.ISQLStatement
	// ------------ Update
	ParseInsertStatement(child ISQLExprParser) statement.ISQLStatement
	// ------------ Update
	ParseUpdateStatement(child ISQLExprParser) statement.ISQLStatement

	// --------------------------------------------- DDL Expr --------------------------------------------------------
	// ------------ Element
	ParseParameterDeclaration(child ISQLExprParser) *statement.SQLParameterDeclaration

	// ------------ Sequence
	ParseSequenceOption(child ISQLExprParser) expr.ISQLExpr

	// ------------ Synonym
	ParseAlterSynonymAction(child ISQLExprParser) expr.ISQLExpr

	// ------------ OnTable
	ParseTableElement(child ISQLExprParser) table.ISQLTableElement
	ParseTableColumn(child ISQLExprParser) *table.SQLTableColumn
	IsParseTableColumnOption(child ISQLExprParser) bool
	ParseTableColumnOption(child ISQLExprParser) (expr.ISQLExpr, bool)
	ParseGeneratedClause(child ISQLExprParser) expr.ISQLExpr
	ParseIdentityColumnClauseOption(child ISQLExprParser) expr.ISQLExpr
	IsParseColumnConstraint() bool
	ParseColumnConstraint(child ISQLExprParser) (table.ISQLColumnConstraint, bool)
	ParseColumnConstraintRest(child ISQLExprParser, name expr.ISQLName) (table.ISQLColumnConstraint, bool)

	IsParseTableConstraint() bool
	ParseTableConstraint(child ISQLExprParser) table.ISQLTableConstraint
	ParseTableConstraintRest(child ISQLExprParser, name expr.ISQLName) (table.ISQLTableConstraint, bool)

	ParsePartitionBy(child ISQLExprParser) table.ISQLPartitionBy
	ParseSubPartitionBy(child ISQLExprParser) table.ISQLSubPartitionBy
	ParsePartitionDefinition(child ISQLExprParser) *table.SQLPartitionDefinition
	ParsePartitionDefinitionOption(child ISQLExprParser) (expr.ISQLExpr, bool)
	ParseSubPartitionDefinition(child ISQLExprParser) *table.SQLSubPartitionDefinition

	ParseAlterTableAction(child ISQLExprParser) table.ISQLAlterTableAction
	ParseAddAlterTableAction(child ISQLExprParser) table.ISQLAlterTableAction
	ParseAddColumnAlterTableAction(child ISQLExprParser) table.ISQLAlterTableAction
	ParseAlterAlterTableAction(child ISQLExprParser) table.ISQLAlterTableAction
	ParseDropAlterTableAction(child ISQLExprParser) table.ISQLAlterTableAction
	ParseChangeAlterTableAction(child ISQLExprParser) table.ISQLAlterTableAction
	ParseModifyAlterTableAction(child ISQLExprParser) table.ISQLAlterTableAction
	ParseRenameAlterTableAction(child ISQLExprParser) table.ISQLAlterTableAction

	// ------------ View
	ParseViewElement(child ISQLExprParser) view.ISQLViewElement
	ParseViewColumn(child ISQLExprParser) *view.SQLViewColumn
	ParseViewColumnOption(child ISQLExprParser) (expr.ISQLExpr, bool)

	// ------------ Select
	ParseWithClause(child ISQLExprParser) select_.ISQLWithClause
	ParseSubQueryFactoringClauseRest(child ISQLExprParser, name expr.ISQLExpr) select_.ISQLFactoringClause
	ParseSubAvFactoringClauseRest(child ISQLExprParser, name expr.ISQLExpr) select_.ISQLFactoringClause

	ParseTableReference(child ISQLExprParser) select_.ISQLTableReference
	ParsePartitionExtensionClause(child ISQLExprParser) expr.ISQLExpr

	ParseLimitOffsetClause(child ISQLExprParser) select_.ISQLLimitClause
	ParseOffsetFetchClause(child ISQLExprParser) select_.ISQLLimitClause

	ParseLockClause(child ISQLExprParser) select_.ISQLLockClause
	ParseForUpdate(child ISQLExprParser) select_.ISQLLockClause
	ParseLockInShareModeClause(child ISQLExprParser) select_.ISQLLockClause
}

type ISQLFunctionStatementParser

type ISQLFunctionStatementParser interface {
	ISQLDDLStatementParser
}

type ISQLHelpStatementParser

type ISQLHelpStatementParser interface {
	ISQLStatementParser
	Parse() statement.ISQLStatement
}

--------------------------- HELP Statement Start ---------------------------

type ISQLIndexStatementParser

type ISQLIndexStatementParser interface {
	ISQLDDLStatementParser
}

type ISQLInsertStatementParser

type ISQLInsertStatementParser interface {
	ISQLStatementParser
	Parse() statement.ISQLStatement
}

------------------------ Insert ------------------------

type ISQLLexer

type ISQLLexer interface {
	Position() int
	Ch() rune

	Limit() int

	Line() int
	Col() int
	Token() *SQLToken
	SetToken(token *SQLToken)

	PreToken() *SQLToken

	Value() string
	PutChar()
	PutAndScanChar()
	ClearValue()

	Mark() *Mark
	Reset() bool
	ResetWithMark(mark *Mark) bool

	IsSQLIdentifierStart() bool
	IsSQLIdentifierPart() bool

	SkipWhitespace()
	ScanChar()
	ScanMinusCommentRest()
	ScanMultiLineCommentRest()
	ScanSharpCommentRest()

	ScanDoubleQuota() *Kind
	ScanReverseQuota() *Kind
	ScanSingleQuota() *Kind

	ScanStartZero() *Kind
	ScanNumeric() *Kind

	ScanStartX(child ISQLLexer) *Kind

	ScanAnd() *Kind
	ScanOr() *Kind
	ScanNot() *Kind
	ScanXor() *Kind
	ScanExclamation() *Kind

	ScanPlus() *Kind
	ScanMinus() *Kind
	ScanStar() *Kind
	ScanSlash() *Kind
	ScanPercent() *Kind

	ScanGT() *Kind
	ScanEQ() *Kind
	ScanLT() *Kind

	ScanDot() *Kind
	ScanAt() *Kind
	ScanQuestion() *Kind

	ScanLeftParen() *Kind
	ScanRightParen() *Kind

	ScanLeftBracket() *Kind
	ScanRightBracket() *Kind

	ScanLeftBrace() *Kind
	ScanRightBrace() *Kind

	ScanComma() *Kind
	ScanSemi() *Kind

	ScanColon(child ISQLLexer) *Kind

	ScanSharp(child ISQLLexer) *Kind

	// ScanIdent() *Kind
	GetKindMap() map[string]*Kind

	StringValue() string

	Comments() []ast.ISQLComment
	AddComment(comment ast.ISQLComment)
	ClearComments()

	IsEOF() bool

	UseNearErrorMsg() string
	UnSupport() string
}

type ISQLPackageBodyStatementParser

type ISQLPackageBodyStatementParser interface {
	ISQLDDLStatementParser
}

type ISQLPackageStatementParser

type ISQLPackageStatementParser interface {
	ISQLDDLStatementParser
}

type ISQLParser

type ISQLParser interface {
	DBType() db.Type

	Config() *SQLParseConfig
	SetConfig(config *SQLParseConfig)

	Lexer() ISQLLexer
	Token() *SQLToken
	Kind() *Kind

	Mark() *Mark
	Reset() bool
	ResetWithMark(mark *Mark) bool

	Accept(kind *Kind) bool
	AcceptWithError(kind *Kind, error bool) bool

	AcceptAndNextToken(kind *Kind) bool
	AcceptAndNextTokenWithError(kind *Kind, error bool) bool

	StringValue() string

	Comments() []ast.ISQLComment
	ClearComments()

	SyntaxError() string
	UnSupport() string
}

type ISQLProcedureStatementParser

type ISQLProcedureStatementParser interface {
	ISQLDDLStatementParser
}

type ISQLRoleStatementParser

type ISQLRoleStatementParser interface {
	ISQLDDLStatementParser
}

type ISQLSchemaStatementParser

type ISQLSchemaStatementParser interface {
	ISQLDDLStatementParser
}

type ISQLSelectStatementParser

type ISQLSelectStatementParser interface {
	ISQLStatementParser
	Parse() statement.ISQLStatement
}

type ISQLSequenceStatementParser

type ISQLSequenceStatementParser interface {
	ISQLDDLStatementParser
}

type ISQLServerStatementParser

type ISQLServerStatementParser interface {
	ISQLDDLStatementParser
}

------------------------ Server ------------------------

type ISQLSetStatementParser

type ISQLSetStatementParser interface {
	ISQLStatementParser
	Parse() statement.ISQLStatement
}

--------------------------- Set Statement ---------------------------

type ISQLShowStatementParser

type ISQLShowStatementParser interface {
	ISQLStatementParser
	Parse() statement.ISQLStatement
}

--------------------------- Show Statement ---------------------------

type ISQLStatementParser

type ISQLStatementParser interface {
	ISQLParser
	ExprParser() ISQLExprParser
	SetExprParser(exprParser ISQLExprParser)
}

type ISQLSynonymStatementParser

type ISQLSynonymStatementParser interface {
	ISQLDDLStatementParser
}

type ISQLTableStatementParser

type ISQLTableStatementParser interface {
	ISQLDDLStatementParser
}

type ISQLTriggerStatementParser

type ISQLTriggerStatementParser interface {
	ISQLDDLStatementParser
}

type ISQLTypeBodyStatementParser

type ISQLTypeBodyStatementParser interface {
	ISQLDDLStatementParser
}

type ISQLTypeStatementParser

type ISQLTypeStatementParser interface {
	ISQLDDLStatementParser
}

type ISQLUpdateStatementParser

type ISQLUpdateStatementParser interface {
	ISQLStatementParser
	Parse() statement.ISQLStatement
}

type ISQLUseStatementParser

type ISQLUseStatementParser interface {
	ISQLStatementParser
	Parse() statement.ISQLStatement
}

--------------------------- USE Statement Start ---------------------------

type ISQLUserStatementParser

type ISQLUserStatementParser interface {
	ISQLDDLStatementParser
}

type ISQLViewStatementParser

type ISQLViewStatementParser interface {
	ISQLDDLStatementParser
}

type Kind

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

func LookUp

func LookUp(lexer ISQLLexer) (*Kind, bool)

func NewKind

func NewKind(name string) *Kind

func ScanIdent

func ScanIdent(lexer ISQLLexer) *Kind

func (*Kind) Equals

func (kind *Kind) Equals(t string) bool

func (*Kind) String

func (kind *Kind) String() string

type Mark

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

type SQLCommentOnColumnStatementParser

type SQLCommentOnColumnStatementParser struct {
	*SQLStatementParser
}

func NewCommentOnColumnStatementParserByExprParser

func NewCommentOnColumnStatementParserByExprParser(exprParser ISQLExprParser) *SQLCommentOnColumnStatementParser

func (*SQLCommentOnColumnStatementParser) Parse

type SQLCommentOnMaterializedViewStatementParser

type SQLCommentOnMaterializedViewStatementParser struct {
	*SQLStatementParser
}

func NewCommentOnMaterializedViewStatementParserByExprParser

func NewCommentOnMaterializedViewStatementParserByExprParser(exprParser ISQLExprParser) *SQLCommentOnMaterializedViewStatementParser

func (*SQLCommentOnMaterializedViewStatementParser) Parse

type SQLCommentOnTableStatementParser

type SQLCommentOnTableStatementParser struct {
	*SQLStatementParser
}

func NewCommentOnTableStatementParserByExprParser

func NewCommentOnTableStatementParserByExprParser(exprParser ISQLExprParser) *SQLCommentOnTableStatementParser

func (*SQLCommentOnTableStatementParser) Parse

type SQLDatabaseStatementParser

type SQLDatabaseStatementParser struct {
	*SQLStatementParser
}

func NewDatabaseStatementParserByExprParser

func NewDatabaseStatementParserByExprParser(exprParser ISQLExprParser) *SQLDatabaseStatementParser

func NewDatabaseStatementParserByLexer

func NewDatabaseStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLDatabaseStatementParser

func NewDatabaseStatementParserBySQL

func NewDatabaseStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLDatabaseStatementParser

func (*SQLDatabaseStatementParser) ParseAlter

func (*SQLDatabaseStatementParser) ParseAlterDatabaseAction

func (sp *SQLDatabaseStatementParser) ParseAlterDatabaseAction() expr.ISQLExpr

func (*SQLDatabaseStatementParser) ParseCreate

func (*SQLDatabaseStatementParser) ParseDrop

type SQLDeleteStatementParser

type SQLDeleteStatementParser struct {
	*SQLStatementParser
}

func NewDeleteStatementParserByExprParser

func NewDeleteStatementParserByExprParser(exprParser ISQLExprParser) *SQLDeleteStatementParser

func NewDeleteStatementParserByLexer

func NewDeleteStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLDeleteStatementParser

func NewDeleteStatementParserBySQL

func NewDeleteStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLDeleteStatementParser

func (*SQLDeleteStatementParser) Parse

type SQLDescStatementParser

type SQLDescStatementParser struct {
	*SQLStatementParser
}

func NewDescStatementParserByExprParser

func NewDescStatementParserByExprParser(exprParser ISQLExprParser) *SQLDescStatementParser

func NewDescStatementParserByLexer

func NewDescStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLDescStatementParser

func NewDescStatementParserBySQL

func NewDescStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLDescStatementParser

func (*SQLDescStatementParser) Parse

type SQLDescribeStatementParser

type SQLDescribeStatementParser struct {
	*SQLStatementParser
}

func NewDescribeStatementParserByExprParser

func NewDescribeStatementParserByExprParser(exprParser ISQLExprParser) *SQLDescribeStatementParser

func NewDescribeStatementParserByLexer

func NewDescribeStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLDescribeStatementParser

func NewDescribeStatementParserBySQL

func NewDescribeStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLDescribeStatementParser

func (*SQLDescribeStatementParser) Parse

type SQLExplainStatementParser

type SQLExplainStatementParser struct {
	*SQLStatementParser
}

func NewExplainStatementParserByExprParser

func NewExplainStatementParserByExprParser(exprParser ISQLExprParser) *SQLExplainStatementParser

func NewExplainStatementParserByLexer

func NewExplainStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLExplainStatementParser

func NewExplainStatementParserBySQL

func NewExplainStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLExplainStatementParser

func (*SQLExplainStatementParser) Parse

type SQLExprParser

type SQLExprParser struct {
	*SQLParser
}

func NewExprParserByLexer

func NewExprParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLExprParser

func NewExprParserBySQL

func NewExprParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLExprParser

func (*SQLExprParser) CreateSQLCommentOnAuditPolicyStatementParser

func (x *SQLExprParser) CreateSQLCommentOnAuditPolicyStatementParser() ISQLCommentStatementParser

func (*SQLExprParser) CreateSQLCommentOnColumnStatementParser

func (x *SQLExprParser) CreateSQLCommentOnColumnStatementParser() ISQLCommentStatementParser

func (*SQLExprParser) CreateSQLCommentOnEditionStatementParser

func (x *SQLExprParser) CreateSQLCommentOnEditionStatementParser() ISQLCommentStatementParser

func (*SQLExprParser) CreateSQLCommentOnIndextypeStatementParser

func (x *SQLExprParser) CreateSQLCommentOnIndextypeStatementParser() ISQLCommentStatementParser

func (*SQLExprParser) CreateSQLCommentOnMaterializedViewStatementParser

func (x *SQLExprParser) CreateSQLCommentOnMaterializedViewStatementParser() ISQLCommentStatementParser

func (*SQLExprParser) CreateSQLCommentOnMiningModelStatementParser

func (x *SQLExprParser) CreateSQLCommentOnMiningModelStatementParser() ISQLCommentStatementParser

func (*SQLExprParser) CreateSQLCommentOnOperatorStatementParser

func (x *SQLExprParser) CreateSQLCommentOnOperatorStatementParser() ISQLCommentStatementParser

func (*SQLExprParser) CreateSQLCommentOnTableStatementParser

func (x *SQLExprParser) CreateSQLCommentOnTableStatementParser() ISQLCommentStatementParser

func (*SQLExprParser) CreateSQLDatabaseStatementParser

func (x *SQLExprParser) CreateSQLDatabaseStatementParser() ISQLDatabaseStatementParser

func (*SQLExprParser) CreateSQLDeleteStatementParser

func (x *SQLExprParser) CreateSQLDeleteStatementParser() ISQLDeleteStatementParser

func (*SQLExprParser) CreateSQLDescStatementParser

func (x *SQLExprParser) CreateSQLDescStatementParser() ISQLExplainStatementParser

func (*SQLExprParser) CreateSQLDescribeStatementParser

func (x *SQLExprParser) CreateSQLDescribeStatementParser() ISQLExplainStatementParser

func (*SQLExprParser) CreateSQLExplainStatementParser

func (x *SQLExprParser) CreateSQLExplainStatementParser() ISQLExplainStatementParser

func (*SQLExprParser) CreateSQLFunctionStatementParser

func (x *SQLExprParser) CreateSQLFunctionStatementParser() ISQLFunctionStatementParser

func (*SQLExprParser) CreateSQLHelpStatementParser

func (x *SQLExprParser) CreateSQLHelpStatementParser() ISQLHelpStatementParser

func (*SQLExprParser) CreateSQLIndexStatementParser

func (x *SQLExprParser) CreateSQLIndexStatementParser() ISQLIndexStatementParser

func (*SQLExprParser) CreateSQLInsertStatementParser

func (x *SQLExprParser) CreateSQLInsertStatementParser() ISQLInsertStatementParser

func (*SQLExprParser) CreateSQLPackageBodyStatementParser

func (x *SQLExprParser) CreateSQLPackageBodyStatementParser() ISQLPackageBodyStatementParser

func (*SQLExprParser) CreateSQLPackageStatementParser

func (x *SQLExprParser) CreateSQLPackageStatementParser() ISQLPackageStatementParser

func (*SQLExprParser) CreateSQLProcedureStatementParser

func (x *SQLExprParser) CreateSQLProcedureStatementParser() ISQLProcedureStatementParser

func (*SQLExprParser) CreateSQLRoleStatementParser

func (x *SQLExprParser) CreateSQLRoleStatementParser() ISQLRoleStatementParser

func (*SQLExprParser) CreateSQLSchemaStatementParser

func (x *SQLExprParser) CreateSQLSchemaStatementParser() ISQLSchemaStatementParser

func (*SQLExprParser) CreateSQLSelectStatementParser

func (x *SQLExprParser) CreateSQLSelectStatementParser() ISQLSelectStatementParser

func (*SQLExprParser) CreateSQLSequenceStatementParser

func (x *SQLExprParser) CreateSQLSequenceStatementParser() ISQLSequenceStatementParser

func (*SQLExprParser) CreateSQLServerStatementParser

func (x *SQLExprParser) CreateSQLServerStatementParser() ISQLServerStatementParser

func (*SQLExprParser) CreateSQLSetCharacterSetStatementParser

func (x *SQLExprParser) CreateSQLSetCharacterSetStatementParser() ISQLSetStatementParser

func (*SQLExprParser) CreateSQLSetCharsetStatementParser

func (x *SQLExprParser) CreateSQLSetCharsetStatementParser() ISQLSetStatementParser

func (*SQLExprParser) CreateSQLSetNamesStatementParser

func (x *SQLExprParser) CreateSQLSetNamesStatementParser() ISQLSetStatementParser

func (*SQLExprParser) CreateSQLSetVariableAssignmentStatementParser

func (x *SQLExprParser) CreateSQLSetVariableAssignmentStatementParser() ISQLSetStatementParser

func (*SQLExprParser) CreateSQLShowCreateDatabaseStatementParser

func (x *SQLExprParser) CreateSQLShowCreateDatabaseStatementParser() ISQLShowStatementParser

func (*SQLExprParser) CreateSQLShowCreateEventStatementParser

func (x *SQLExprParser) CreateSQLShowCreateEventStatementParser() ISQLShowStatementParser

func (*SQLExprParser) CreateSQLShowCreateFunctionStatementParser

func (x *SQLExprParser) CreateSQLShowCreateFunctionStatementParser() ISQLShowStatementParser

func (*SQLExprParser) CreateSQLShowCreateProcedureStatementParser

func (x *SQLExprParser) CreateSQLShowCreateProcedureStatementParser() ISQLShowStatementParser

func (*SQLExprParser) CreateSQLShowCreateTableStatementParser

func (x *SQLExprParser) CreateSQLShowCreateTableStatementParser() ISQLShowStatementParser

func (*SQLExprParser) CreateSQLShowCreateTriggerStatementParser

func (x *SQLExprParser) CreateSQLShowCreateTriggerStatementParser() ISQLShowStatementParser

func (*SQLExprParser) CreateSQLShowCreateViewStatementParser

func (x *SQLExprParser) CreateSQLShowCreateViewStatementParser() ISQLShowStatementParser

func (*SQLExprParser) CreateSQLShowDatabasesStatementParser

func (x *SQLExprParser) CreateSQLShowDatabasesStatementParser() ISQLShowStatementParser

func (*SQLExprParser) CreateSQLSynonymStatementParser

func (x *SQLExprParser) CreateSQLSynonymStatementParser() ISQLSynonymStatementParser

func (*SQLExprParser) CreateSQLTableStatementParser

func (x *SQLExprParser) CreateSQLTableStatementParser() ISQLTableStatementParser

func (*SQLExprParser) CreateSQLTriggerStatementParser

func (x *SQLExprParser) CreateSQLTriggerStatementParser() ISQLTriggerStatementParser

func (*SQLExprParser) CreateSQLTypeBodyStatementParser

func (x *SQLExprParser) CreateSQLTypeBodyStatementParser() ISQLTypeBodyStatementParser

func (*SQLExprParser) CreateSQLTypeStatementParser

func (x *SQLExprParser) CreateSQLTypeStatementParser() ISQLTypeStatementParser

func (*SQLExprParser) CreateSQLUpdateStatementParser

func (x *SQLExprParser) CreateSQLUpdateStatementParser() ISQLUpdateStatementParser

func (*SQLExprParser) CreateSQLUseStatementParser

func (x *SQLExprParser) CreateSQLUseStatementParser() ISQLUseStatementParser

func (*SQLExprParser) CreateSQLUserStatementParser

func (x *SQLExprParser) CreateSQLUserStatementParser() ISQLUserStatementParser

func (*SQLExprParser) CreateSQLViewStatementParser

func (x *SQLExprParser) CreateSQLViewStatementParser() ISQLViewStatementParser

func (*SQLExprParser) IsComplexFunction

func (sp *SQLExprParser) IsComplexFunction(name string) bool

func (*SQLExprParser) IsNonParametricFunction

func (sp *SQLExprParser) IsNonParametricFunction(name string) bool

func (*SQLExprParser) IsParseColumnConstraint

func (sp *SQLExprParser) IsParseColumnConstraint() bool

func (*SQLExprParser) IsParseLikeCondition

func (sp *SQLExprParser) IsParseLikeCondition() bool

func (*SQLExprParser) IsParseTableColumnOption

func (sp *SQLExprParser) IsParseTableColumnOption(child ISQLExprParser) bool

func (*SQLExprParser) IsParseTableConstraint

func (sp *SQLExprParser) IsParseTableConstraint() bool

func (*SQLExprParser) IsParserSubAvFactoringClauseRest

func (sp *SQLExprParser) IsParserSubAvFactoringClauseRest() bool

func (*SQLExprParser) IsParserSubQueryFactoringClauseRest

func (sp *SQLExprParser) IsParserSubQueryFactoringClauseRest() bool

func (*SQLExprParser) ParseAddAlterTableAction

func (sp *SQLExprParser) ParseAddAlterTableAction(child ISQLExprParser) table.ISQLAlterTableAction

func (*SQLExprParser) ParseAddColumnAlterTableAction

func (sp *SQLExprParser) ParseAddColumnAlterTableAction(child ISQLExprParser) table.ISQLAlterTableAction

func (*SQLExprParser) ParseAdditiveOperatorExpr

func (sp *SQLExprParser) ParseAdditiveOperatorExpr(child ISQLExprParser) expr.ISQLExpr

* * E: T (+/-) T (+/-) T ... * T: X (*, /, DIV, %, MOD) X * +, - * https://dev.mysql.com/doc/refman/8.0/en/operator-precedence.html

func (*SQLExprParser) ParseAdditiveOperatorExprRest

func (sp *SQLExprParser) ParseAdditiveOperatorExprRest(child ISQLExprParser, left expr.ISQLExpr) expr.ISQLExpr

func (*SQLExprParser) ParseAlterAlterTableAction

func (sp *SQLExprParser) ParseAlterAlterTableAction(child ISQLExprParser) table.ISQLAlterTableAction

*

func (*SQLExprParser) ParseAlterSynonymAction

func (sp *SQLExprParser) ParseAlterSynonymAction(child ISQLExprParser) expr.ISQLExpr

--------------------------- Synonym --------------------------------------------------

func (*SQLExprParser) ParseAlterTableAction

func (sp *SQLExprParser) ParseAlterTableAction(child ISQLExprParser) table.ISQLAlterTableAction

*

func (*SQLExprParser) ParseAndOperatorExpr

func (x *SQLExprParser) ParseAndOperatorExpr(child ISQLExprParser) expr.ISQLExpr

* * E: T op T op T * T: X comparisonOperator X * op: AND * https://ronsavage.github.io/SQL/sql-2003-2.bnf.html#boolean%20term

func (*SQLExprParser) ParseAndOperatorExprRest

func (sp *SQLExprParser) ParseAndOperatorExprRest(child ISQLExprParser, left expr.ISQLExpr) expr.ISQLExpr

func (*SQLExprParser) ParseAtExpr

func (sp *SQLExprParser) ParseAtExpr(child ISQLExprParser) expr.ISQLExpr

func (*SQLExprParser) ParseBetweenConditionRest

func (sp *SQLExprParser) ParseBetweenConditionRest(child ISQLExprParser, not bool, left expr.ISQLExpr) expr.ISQLExpr

func (*SQLExprParser) ParseBitAndOperatorExpr

func (sp *SQLExprParser) ParseBitAndOperatorExpr(child ISQLExprParser) expr.ISQLExpr

* * E: T & T & T * T: X (<<,>> ) X * https://dev.mysql.com/doc/refman/8.0/en/operator-precedence.html

func (*SQLExprParser) ParseBitAndOperatorExprRest

func (sp *SQLExprParser) ParseBitAndOperatorExprRest(child ISQLExprParser, left expr.ISQLExpr) expr.ISQLExpr

func (*SQLExprParser) ParseBitOrOperatorExpr

func (sp *SQLExprParser) ParseBitOrOperatorExpr(child ISQLExprParser) expr.ISQLExpr

* * E: T | T | T * T: X & X * https://dev.mysql.com/doc/refman/8.0/en/operator-precedence.html

func (*SQLExprParser) ParseBitOrOperatorExprRest

func (sp *SQLExprParser) ParseBitOrOperatorExprRest(child ISQLExprParser, left expr.ISQLExpr) expr.ISQLExpr

func (*SQLExprParser) ParseBitXorOperatorExpr

func (x *SQLExprParser) ParseBitXorOperatorExpr(child ISQLExprParser) expr.ISQLExpr

*

func (*SQLExprParser) ParseBitXorOperatorExprRest

func (x *SQLExprParser) ParseBitXorOperatorExprRest(child ISQLExprParser, left expr.ISQLExpr) expr.ISQLExpr

func (*SQLExprParser) ParseCallExpr

func (self *SQLExprParser) ParseCallExpr(child ISQLExprParser, name expr.ISQLExpr) expr.ISQLExpr

*

  • =>

func (*SQLExprParser) ParseChangeAlterTableAction

func (sp *SQLExprParser) ParseChangeAlterTableAction(child ISQLExprParser) table.ISQLAlterTableAction

func (*SQLExprParser) ParseCollateClause

func (sp *SQLExprParser) ParseCollateClause(child ISQLExprParser) *common.SQLCollateClause

func (*SQLExprParser) ParseColumnConstraint

func (sp *SQLExprParser) ParseColumnConstraint(child ISQLExprParser) (table.ISQLColumnConstraint, bool)

func (*SQLExprParser) ParseColumnConstraintRest

func (sp *SQLExprParser) ParseColumnConstraintRest(child ISQLExprParser, name expr.ISQLName) (table.ISQLColumnConstraint, bool)

func (*SQLExprParser) ParseCommentExpr

func (sp *SQLExprParser) ParseCommentExpr(child ISQLExprParser) *table.SQLCommentExpr

func (*SQLExprParser) ParseComments

func (sp *SQLExprParser) ParseComments(child ISQLExprParser) []ast.ISQLComment

func (*SQLExprParser) ParseComplexFunction

func (sp *SQLExprParser) ParseComplexFunction(child ISQLExprParser, name expr.ISQLExpr) expr.ISQLExpr

func (*SQLExprParser) ParseDBLinkExpr

func (sp *SQLExprParser) ParseDBLinkExpr(child ISQLExprParser, name expr.ISQLExpr) expr.ISQLExpr

*

  • xx@xx

func (*SQLExprParser) ParseDateDataType

func (sep *SQLExprParser) ParseDateDataType(child ISQLExprParser) datatype.ISQLDataType

func (*SQLExprParser) ParseDateTimeDataType

func (spe *SQLExprParser) ParseDateTimeDataType(child ISQLExprParser) datatype.ISQLDataType

func (*SQLExprParser) ParseDefaultClause

func (sp *SQLExprParser) ParseDefaultClause(child ISQLExprParser) *table.SQLDefaultClause

*

  • DEFAULT expr

func (*SQLExprParser) ParseDeleteStatement

func (sp *SQLExprParser) ParseDeleteStatement(child ISQLExprParser) statement.ISQLStatement

*

func (*SQLExprParser) ParseDropAlterTableAction

func (sp *SQLExprParser) ParseDropAlterTableAction(child ISQLExprParser) table.ISQLAlterTableAction

func (*SQLExprParser) ParseExprRest

func (sp *SQLExprParser) ParseExprRest(child ISQLExprParser, left expr.ISQLExpr) expr.ISQLExpr

func (*SQLExprParser) ParseForUpdate

func (sp *SQLExprParser) ParseForUpdate(child ISQLExprParser) select_.ISQLLockClause

* * FOR { UPDATE | NO KEY UPDATE | SHARE | KEY SHARE } [ OF table_name [, ...] ] [ NOWAIT | SKIP LOCKED| WAIT integer ] [...]

func (*SQLExprParser) ParseForUpdateRest

func (sp *SQLExprParser) ParseForUpdateRest(child ISQLExprParser, x *select_.AbstractSQLLockForClause)

func (*SQLExprParser) ParseFunctionWithName

func (sp *SQLExprParser) ParseFunctionWithName(child ISQLExprParser, name expr.ISQLExpr) expr.ISQLExpr

*

  • xx
  • x.xx() *
  • @param expr
  • @return xx.xx

func (*SQLExprParser) ParseGeneratedClause

func (sp *SQLExprParser) ParseGeneratedClause(child ISQLExprParser) expr.ISQLExpr

*

func (*SQLExprParser) ParseHighPriorityComparisonOperatorExpr

func (sp *SQLExprParser) ParseHighPriorityComparisonOperatorExpr(child ISQLExprParser) expr.ISQLExpr

* * E: T op T op T ... * T: X | X * op: = (comparison), <=>, >=, >, <=, <, <>, != * https://dev.mysql.com/doc/refman/8.0/en/operator-precedence.html

func (*SQLExprParser) ParseHighPriorityComparisonOperatorExprRest

func (sp *SQLExprParser) ParseHighPriorityComparisonOperatorExprRest(child ISQLExprParser, left expr.ISQLExpr) expr.ISQLExpr

func (SQLExprParser) ParseIdentifier

func (sp SQLExprParser) ParseIdentifier(child ISQLExprParser) expr.ISQLIdentifier

func (*SQLExprParser) ParseIdentityColumnClauseOption

func (sp *SQLExprParser) ParseIdentityColumnClauseOption(child ISQLExprParser) expr.ISQLExpr

func (*SQLExprParser) ParseInConditionRest

func (sp *SQLExprParser) ParseInConditionRest(child ISQLExprParser, not bool, left expr.ISQLExpr) expr.ISQLExpr

func (*SQLExprParser) ParseInsertStatement

func (sp *SQLExprParser) ParseInsertStatement(child ISQLExprParser) statement.ISQLStatement

*

  • INSERT INTO ( <table name> | ONLY <left paren> <table name> <right paren> ) ( <from subquery> | <from constructor> | <from default> ) *
  • <from subquery>: [ <left paren> <insert column list> <right paren> ] [ <override clause> ] <query expression>
  • <from constructor>: [ <left paren> <insert column list> <right paren> ] [ <override clause> ] <contextually typed table value constructor>
  • <from default>: DEFAULT VALUES
  • https://ronsavage.github.io/SQL/sql-2003-2.bnf.html#insert%20statement

func (*SQLExprParser) ParseIsConditionRest

func (sp *SQLExprParser) ParseIsConditionRest(child ISQLExprParser, left expr.ISQLExpr) expr.ISQLExpr

*

func (*SQLExprParser) ParseLikeConditionRest

func (sp *SQLExprParser) ParseLikeConditionRest(child ISQLExprParser, not bool, left expr.ISQLExpr) expr.ISQLExpr

func (*SQLExprParser) ParseLimitOffsetClause

func (sp *SQLExprParser) ParseLimitOffsetClause(child ISQLExprParser) select_.ISQLLimitClause

* * LIMIT row_count * LIMIT offset, row_count * LIMIT row_count OFFSET offset

func (SQLExprParser) ParseLockClause

func (sp SQLExprParser) ParseLockClause(child ISQLExprParser) select_.ISQLLockClause

func (*SQLExprParser) ParseLockInShareModeClause

func (sp *SQLExprParser) ParseLockInShareModeClause(child ISQLExprParser) select_.ISQLLockClause

*

  • LOCK IN SHARE MODE

func (*SQLExprParser) ParseLowPriorityComparisonOperatorExpr

func (sp *SQLExprParser) ParseLowPriorityComparisonOperatorExpr(child ISQLExprParser) expr.ISQLExpr

* * E: T op T op T ... * T: X | X * op: IS NOT NULL, LIKE, NOT BETWEEN, NOT IN * https://dev.mysql.com/doc/refman/8.0/en/operator-precedence.html

func (*SQLExprParser) ParseLowPriorityComparisonOperatorExprRest

func (sp *SQLExprParser) ParseLowPriorityComparisonOperatorExprRest(child ISQLExprParser, left expr.ISQLExpr) expr.ISQLExpr

func (*SQLExprParser) ParseModifyAlterTableAction

func (sp *SQLExprParser) ParseModifyAlterTableAction(child ISQLExprParser) table.ISQLAlterTableAction

func (*SQLExprParser) ParseMultiplicativeOperatorExpr

func (sp *SQLExprParser) ParseMultiplicativeOperatorExpr(child ISQLExprParser) expr.ISQLExpr

* * E: T op T op T ... * T: X ^ X * OP: *, /, DIV, %, MOD * https://dev.mysql.com/doc/refman/8.0/en/operator-precedence.html

func (*SQLExprParser) ParseMultiplicativeOperatorExprRest

func (sp *SQLExprParser) ParseMultiplicativeOperatorExprRest(child ISQLExprParser, left expr.ISQLExpr) expr.ISQLExpr

func (*SQLExprParser) ParseNameRest

func (sp *SQLExprParser) ParseNameRest(child ISQLExprParser, owner expr.ISQLName) expr.ISQLName

func (*SQLExprParser) ParseNonParametricFunction

func (sp *SQLExprParser) ParseNonParametricFunction(child ISQLExprParser, name expr.ISQLExpr) expr.ISQLExpr

func (*SQLExprParser) ParseNotComparisonOperatorExprRest

func (sp *SQLExprParser) ParseNotComparisonOperatorExprRest(child ISQLExprParser, left expr.ISQLExpr) expr.ISQLExpr

func (*SQLExprParser) ParseNotExpr

func (x *SQLExprParser) ParseNotExpr(child ISQLExprParser) expr.ISQLExpr

* * E: NOT T * T: * op: NOT * https://ronsavage.github.io/SQL/sql-2003-2.bnf.html#boolean%20factor

func (*SQLExprParser) ParseNotExprRest

func (sp *SQLExprParser) ParseNotExprRest(child ISQLExprParser, left expr.ISQLExpr) expr.ISQLExpr

func (*SQLExprParser) ParseOffsetFetchClause

func (sp *SQLExprParser) ParseOffsetFetchClause(child ISQLExprParser) select_.ISQLLimitClause

func (*SQLExprParser) ParseOrOperatorExpr

func (x *SQLExprParser) ParseOrOperatorExpr(child ISQLExprParser) expr.ISQLExpr

* * E: T op T op T * T: X AND X * op: OR * https://ronsavage.github.io/SQL/sql-2003-2.bnf.html#boolean%20value%20expression

func (*SQLExprParser) ParseOrOperatorExprRest

func (sp *SQLExprParser) ParseOrOperatorExprRest(child ISQLExprParser, left expr.ISQLExpr) expr.ISQLExpr

func (*SQLExprParser) ParseOuterJoinExprRest

func (self *SQLExprParser) ParseOuterJoinExprRest(x expr.ISQLExpr) (expr.ISQLExpr, bool)

(+)

func (*SQLExprParser) ParseParameterDeclaration

func (sp *SQLExprParser) ParseParameterDeclaration(child ISQLExprParser) *statement.SQLParameterDeclaration

func (*SQLExprParser) ParsePartitionBy

func (sp *SQLExprParser) ParsePartitionBy(child ISQLExprParser) table.ISQLPartitionBy

func (*SQLExprParser) ParsePartitionByRest

func (sp *SQLExprParser) ParsePartitionByRest(child ISQLExprParser, x table.ISQLPartitionBy)

func (*SQLExprParser) ParsePartitionDefinition

func (sp *SQLExprParser) ParsePartitionDefinition(child ISQLExprParser) *table.SQLPartitionDefinition

*

  • PARTITION partition_name [VALUES {LESS THAN {(expr | value_list) | MAXVALUE} | IN (value_list)}] [STORAGE ENGINE [=] engine_name] [COMMENT [=] 'string' ] [DATA DIRECTORY [=] 'data_dir'] [INDEX DIRECTORY [=] 'index_dir'] [MAX_ROWS [=] max_number_of_rows] [MIN_ROWS [=] min_number_of_rows] [TABLESPACE [=] tablespace_name] [(subpartition_definition [, subpartition_definition] ...)]

func (*SQLExprParser) ParsePartitionDefinitionOption

func (sp *SQLExprParser) ParsePartitionDefinitionOption(child ISQLExprParser) (expr.ISQLExpr, bool)

func (*SQLExprParser) ParsePartitionExtensionClause

func (sp *SQLExprParser) ParsePartitionExtensionClause(child ISQLExprParser) expr.ISQLExpr

*

  • PARTITION (name, name...)

func (*SQLExprParser) ParsePartitionValues

func (sp *SQLExprParser) ParsePartitionValues(child ISQLExprParser) table.ISQLPartitionValues

*

  • [VALUES {LESS THAN {(expr | value_list) | MAXVALUE} | IN (value_list)} ]

func (*SQLExprParser) ParsePrimaryExprRest

func (sp *SQLExprParser) ParsePrimaryExprRest(child ISQLExprParser, left expr.ISQLExpr) expr.ISQLExpr

func (*SQLExprParser) ParseRegexpConditionRest

func (sp *SQLExprParser) ParseRegexpConditionRest(child ISQLExprParser, not bool, left expr.ISQLExpr) expr.ISQLExpr

func (*SQLExprParser) ParseRenameAlterTableAction

func (sp *SQLExprParser) ParseRenameAlterTableAction(child ISQLExprParser) table.ISQLAlterTableAction

func (*SQLExprParser) ParseSequenceOption

func (sp *SQLExprParser) ParseSequenceOption(child ISQLExprParser) expr.ISQLExpr

--------------------------- Sequence --------------------------------------------------

func (*SQLExprParser) ParseShiftOperatorExpr

func (sp *SQLExprParser) ParseShiftOperatorExpr(child ISQLExprParser) expr.ISQLExpr

* * E: T op T op T * T: X +/- X * op: <<, >> * https://dev.mysql.com/doc/refman/8.0/en/operator-precedence.html

func (*SQLExprParser) ParseShiftOperatorExprRest

func (sp *SQLExprParser) ParseShiftOperatorExprRest(child ISQLExprParser, left expr.ISQLExpr) expr.ISQLExpr

func (*SQLExprParser) ParseStatements

func (x *SQLExprParser) ParseStatements() []ast.ISQLObject

func (*SQLExprParser) ParseStatementsWithParent

func (x *SQLExprParser) ParseStatementsWithParent(parent ast.ISQLObject) []ast.ISQLObject

func (*SQLExprParser) ParseSubAvFactoringClauseRest

func (sp *SQLExprParser) ParseSubAvFactoringClauseRest(child ISQLExprParser, name expr.ISQLExpr) select_.ISQLFactoringClause

func (*SQLExprParser) ParseSubPartitionBy

func (sp *SQLExprParser) ParseSubPartitionBy(child ISQLExprParser) table.ISQLSubPartitionBy

func (*SQLExprParser) ParseSubPartitionByRest

func (sp *SQLExprParser) ParseSubPartitionByRest(child ISQLExprParser, x table.ISQLSubPartitionBy)

func (*SQLExprParser) ParseSubPartitionDefinition

func (sp *SQLExprParser) ParseSubPartitionDefinition(child ISQLExprParser) *table.SQLSubPartitionDefinition

*

  • SUBPARTITION logical_name [STORAGE ENGINE [=] engine_name] [COMMENT [=] 'string' ] [DATA DIRECTORY [=] 'data_dir'] [INDEX DIRECTORY [=] 'index_dir'] [MAX_ROWS [=] max_number_of_rows] [MIN_ROWS [=] min_number_of_rows] [TABLESPACE [=] tablespace_name]

func (*SQLExprParser) ParseSubQueryFactoringClauseRest

func (sp *SQLExprParser) ParseSubQueryFactoringClauseRest(child ISQLExprParser, name expr.ISQLExpr) select_.ISQLFactoringClause

func (*SQLExprParser) ParseTableColumn

func (sp *SQLExprParser) ParseTableColumn(child ISQLExprParser) *table.SQLTableColumn

*

*
* https://ronsavage.github.io/SQL/sql-2003-2.bnf.html#column%20definition

func (*SQLExprParser) ParseTableColumnOption

func (sp *SQLExprParser) ParseTableColumnOption(child ISQLExprParser) (expr.ISQLExpr, bool)

func (*SQLExprParser) ParseTableConstraint

func (sp *SQLExprParser) ParseTableConstraint(child ISQLExprParser) table.ISQLTableConstraint

func (*SQLExprParser) ParseTableConstraintRest

func (sp *SQLExprParser) ParseTableConstraintRest(child ISQLExprParser, name expr.ISQLName) (table.ISQLTableConstraint, bool)

func (SQLExprParser) ParseTableElement

func (sp SQLExprParser) ParseTableElement(child ISQLExprParser) table.ISQLTableElement

func (*SQLExprParser) ParseTableReference

func (sp *SQLExprParser) ParseTableReference(child ISQLExprParser) select_.ISQLTableReference

func (*SQLExprParser) ParseTimeDataType

func (x *SQLExprParser) ParseTimeDataType(child ISQLExprParser) datatype.ISQLDataType

func (*SQLExprParser) ParseTimestampDataType

func (x *SQLExprParser) ParseTimestampDataType(child ISQLExprParser) datatype.ISQLDataType

func (*SQLExprParser) ParseUpdateStatement

func (sp *SQLExprParser) ParseUpdateStatement(child ISQLExprParser) statement.ISQLStatement

*

func (*SQLExprParser) ParseViewColumn

func (sp *SQLExprParser) ParseViewColumn(child ISQLExprParser) *view.SQLViewColumn

func (*SQLExprParser) ParseViewColumnOption

func (sp *SQLExprParser) ParseViewColumnOption(child ISQLExprParser) (expr.ISQLExpr, bool)

func (*SQLExprParser) ParseViewElement

func (sp *SQLExprParser) ParseViewElement(child ISQLExprParser) view.ISQLViewElement

func (*SQLExprParser) ParseWithClause

func (sp *SQLExprParser) ParseWithClause(child ISQLExprParser) select_.ISQLWithClause

func (*SQLExprParser) ParseXOROperatorExpr

func (x *SQLExprParser) ParseXOROperatorExpr(child ISQLExprParser) expr.ISQLExpr

* * E: T XOR T XOR T * T: X (AND, &&) X * https://dev.mysql.com/doc/refman/8.0/en/operator-precedence.html

func (*SQLExprParser) ParseXOROperatorExprRest

func (x *SQLExprParser) ParseXOROperatorExprRest(child ISQLExprParser, left expr.ISQLExpr) expr.ISQLExpr

type SQLFunctionStatementParser

type SQLFunctionStatementParser struct {
	*SQLStatementParser
}

func NewFunctionStatementParserByExprParser

func NewFunctionStatementParserByExprParser(exprParser ISQLExprParser) *SQLFunctionStatementParser

func NewFunctionStatementParserByLexer

func NewFunctionStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLFunctionStatementParser

func NewFunctionStatementParserBySQL

func NewFunctionStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLFunctionStatementParser

func (*SQLFunctionStatementParser) ParseAlter

func (*SQLFunctionStatementParser) ParseCreate

func (*SQLFunctionStatementParser) ParseDrop

type SQLHelpStatementParser

type SQLHelpStatementParser struct {
	*SQLStatementParser
}

func NewHelpStatementParserByExprParser

func NewHelpStatementParserByExprParser(exprParser ISQLExprParser) *SQLHelpStatementParser

func (*SQLHelpStatementParser) Parse

type SQLIndexStatementParser

type SQLIndexStatementParser struct {
	*SQLStatementParser
}

func NewIndexStatementParserByExprParser

func NewIndexStatementParserByExprParser(exprParser ISQLExprParser) *SQLIndexStatementParser

func NewIndexStatementParserByLexer

func NewIndexStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLIndexStatementParser

func NewIndexStatementParserBySQL

func NewIndexStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLIndexStatementParser

func (*SQLIndexStatementParser) ParseAlter

func (*SQLIndexStatementParser) ParseCreate

func (*SQLIndexStatementParser) ParseDrop

func (*SQLIndexStatementParser) ParseIndexColumn

func (sp *SQLIndexStatementParser) ParseIndexColumn() *index.SQLIndexColumn

type SQLInsertStatementParser

type SQLInsertStatementParser struct {
	*SQLStatementParser
}

func NewInsertStatementParserByExprParser

func NewInsertStatementParserByExprParser(exprParser ISQLExprParser) *SQLInsertStatementParser

func NewInsertStatementParserByLexer

func NewInsertStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLInsertStatementParser

func NewInsertStatementParserBySQL

func NewInsertStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLInsertStatementParser

func (*SQLInsertStatementParser) Parse

type SQLLexer

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

func NewLexer

func NewLexer(sql string) *SQLLexer

func (*SQLLexer) AddComment

func (lexer *SQLLexer) AddComment(comment ast.ISQLComment)

func (*SQLLexer) Ch

func (lexer *SQLLexer) Ch() rune

func (*SQLLexer) ClearComments

func (lexer *SQLLexer) ClearComments()

func (*SQLLexer) ClearValue

func (lexer *SQLLexer) ClearValue()

func (*SQLLexer) Col

func (lexer *SQLLexer) Col() int

func (*SQLLexer) Comments

func (lexer *SQLLexer) Comments() []ast.ISQLComment

func (*SQLLexer) GetKindMap

func (lexer *SQLLexer) GetKindMap() map[string]*Kind

func (*SQLLexer) IsEOF

func (lexer *SQLLexer) IsEOF() bool

func (*SQLLexer) IsSQLIdentifierPart

func (lexer *SQLLexer) IsSQLIdentifierPart() bool

func (*SQLLexer) IsSQLIdentifierPartWithCh

func (lexer *SQLLexer) IsSQLIdentifierPartWithCh(ch rune) bool

func (*SQLLexer) IsSQLIdentifierStart

func (lexer *SQLLexer) IsSQLIdentifierStart() bool

func (*SQLLexer) IsSQLIdentifierStartWithCh

func (lexer *SQLLexer) IsSQLIdentifierStartWithCh(ch rune) bool

func (*SQLLexer) Limit

func (lexer *SQLLexer) Limit() int

func (*SQLLexer) Line

func (lexer *SQLLexer) Line() int

func (*SQLLexer) Mark

func (lexer *SQLLexer) Mark() *Mark

func (*SQLLexer) Position

func (lexer *SQLLexer) Position() int

func (*SQLLexer) PreToken

func (lexer *SQLLexer) PreToken() *SQLToken

func (*SQLLexer) PutAndScanChar

func (lexer *SQLLexer) PutAndScanChar()

func (*SQLLexer) PutChar

func (lexer *SQLLexer) PutChar()

func (*SQLLexer) PutCharWithCh

func (lexer *SQLLexer) PutCharWithCh(ch rune)

func (*SQLLexer) Reset

func (lexer *SQLLexer) Reset() bool

func (*SQLLexer) ResetWithMark

func (lexer *SQLLexer) ResetWithMark(mark *Mark) bool

func (*SQLLexer) ScanAnd

func (lexer *SQLLexer) ScanAnd() *Kind

func (*SQLLexer) ScanAt

func (lexer *SQLLexer) ScanAt() *Kind

func (*SQLLexer) ScanChar

func (lexer *SQLLexer) ScanChar()

func (*SQLLexer) ScanColon

func (lexer *SQLLexer) ScanColon(child ISQLLexer) *Kind

func (*SQLLexer) ScanComma

func (lexer *SQLLexer) ScanComma() *Kind

func (*SQLLexer) ScanDigit

func (lexer *SQLLexer) ScanDigit()

func (*SQLLexer) ScanDot

func (lexer *SQLLexer) ScanDot() *Kind

func (*SQLLexer) ScanDoubleQuota

func (lexer *SQLLexer) ScanDoubleQuota() *Kind

"" "xxx"" xxx" => xxx" xxx "xxx" " xxx" => xxx xxx

func (*SQLLexer) ScanEQ

func (lexer *SQLLexer) ScanEQ() *Kind

=

func (*SQLLexer) ScanExclamation

func (lexer *SQLLexer) ScanExclamation() *Kind

! !=

func (*SQLLexer) ScanGT

func (lexer *SQLLexer) ScanGT() *Kind

> >>、>=

func (*SQLLexer) ScanHexadecimal

func (lexer *SQLLexer) ScanHexadecimal()

*

  • '01AF'
  • 01AF

func (*SQLLexer) ScanLT

func (lexer *SQLLexer) ScanLT() *Kind

< <<、<>、<=、<=>

func (*SQLLexer) ScanLeftBrace

func (lexer *SQLLexer) ScanLeftBrace() *Kind

func (*SQLLexer) ScanLeftBracket

func (lexer *SQLLexer) ScanLeftBracket() *Kind

func (*SQLLexer) ScanLeftParen

func (lexer *SQLLexer) ScanLeftParen() *Kind

func (*SQLLexer) ScanMinus

func (lexer *SQLLexer) ScanMinus() *Kind

func (*SQLLexer) ScanMinusCommentRest

func (lexer *SQLLexer) ScanMinusCommentRest()

*

  • -- comment

func (*SQLLexer) ScanMultiLineCommentRest

func (lexer *SQLLexer) ScanMultiLineCommentRest()

/* */

func (*SQLLexer) ScanNot

func (lexer *SQLLexer) ScanNot() *Kind

func (*SQLLexer) ScanNumeric

func (lexer *SQLLexer) ScanNumeric() *Kind

*

  • 1, .2, 3.4, -5, -6.78, +9.10
  • 1.2E3, 1.2E-3, -1.2E3, -1.2E-3

func (*SQLLexer) ScanOr

func (lexer *SQLLexer) ScanOr() *Kind

func (*SQLLexer) ScanPercent

func (lexer *SQLLexer) ScanPercent() *Kind

func (*SQLLexer) ScanPlus

func (lexer *SQLLexer) ScanPlus() *Kind

+ +1

func (*SQLLexer) ScanQuestion

func (lexer *SQLLexer) ScanQuestion() *Kind

func (*SQLLexer) ScanReverseQuota

func (lexer *SQLLexer) ScanReverseQuota() *Kind

func (*SQLLexer) ScanRightBrace

func (lexer *SQLLexer) ScanRightBrace() *Kind

func (*SQLLexer) ScanRightBracket

func (lexer *SQLLexer) ScanRightBracket() *Kind

func (*SQLLexer) ScanRightParen

func (lexer *SQLLexer) ScanRightParen() *Kind

func (*SQLLexer) ScanSemi

func (lexer *SQLLexer) ScanSemi() *Kind

func (*SQLLexer) ScanSharp

func (lexer *SQLLexer) ScanSharp(child ISQLLexer) *Kind

func (*SQLLexer) ScanSharpCommentRest

func (lexer *SQLLexer) ScanSharpCommentRest()

*

  • # comment

func (*SQLLexer) ScanSingleQuota

func (lexer *SQLLexer) ScanSingleQuota() *Kind

” 'xxx' xxx' => xxx" xxx 'xxx' ' xxx' => xxx xxx

func (*SQLLexer) ScanSlash

func (lexer *SQLLexer) ScanSlash() *Kind

* / * /*

func (*SQLLexer) ScanStar

func (lexer *SQLLexer) ScanStar() *Kind

*

func (*SQLLexer) ScanStartX

func (lexer *SQLLexer) ScanStartX(child ISQLLexer) *Kind

*

func (*SQLLexer) ScanStartZero

func (lexer *SQLLexer) ScanStartZero() *Kind

*

  • 0、0.1
  • 0x01AF

func (*SQLLexer) ScanString

func (lexer *SQLLexer) ScanString()

"string" 'string' `string`

func (*SQLLexer) ScanXor

func (lexer *SQLLexer) ScanXor() *Kind

^

func (*SQLLexer) SetToken

func (lexer *SQLLexer) SetToken(token *SQLToken)

func (*SQLLexer) SkipChar

func (lexer *SQLLexer) SkipChar(count int)

func (*SQLLexer) SkipWhitespace

func (lexer *SQLLexer) SkipWhitespace()

func (*SQLLexer) StringValue

func (lexer *SQLLexer) StringValue() string

func (*SQLLexer) Token

func (lexer *SQLLexer) Token() *SQLToken

func (*SQLLexer) UnSupport

func (lexer *SQLLexer) UnSupport() string

func (*SQLLexer) UseNearErrorMsg

func (lexer *SQLLexer) UseNearErrorMsg() string

func (*SQLLexer) Value

func (lexer *SQLLexer) Value() string

type SQLPackageBodyStatementParser

type SQLPackageBodyStatementParser struct {
	*SQLStatementParser
}

func NewPackageBodyStatementParserByExprParser

func NewPackageBodyStatementParserByExprParser(exprParser ISQLExprParser) *SQLPackageBodyStatementParser

func NewPackageBodyStatementParserByLexer

func NewPackageBodyStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLPackageBodyStatementParser

func NewPackageBodyStatementParserBySQL

func NewPackageBodyStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLPackageBodyStatementParser

func (*SQLPackageBodyStatementParser) ParseAlter

func (*SQLPackageBodyStatementParser) ParseCreate

func (*SQLPackageBodyStatementParser) ParseDrop

type SQLPackageStatementParser

type SQLPackageStatementParser struct {
	*SQLStatementParser
}

func NewPackageStatementParserByExprParser

func NewPackageStatementParserByExprParser(exprParser ISQLExprParser) *SQLPackageStatementParser

func NewPackageStatementParserByLexer

func NewPackageStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLPackageStatementParser

func NewPackageStatementParserBySQL

func NewPackageStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLPackageStatementParser

func (*SQLPackageStatementParser) ParseAlter

func (*SQLPackageStatementParser) ParseCreate

func (*SQLPackageStatementParser) ParseDrop

type SQLParseConfig

type SQLParseConfig struct {
	SkipComment bool
}

func NewParseConfig

func NewParseConfig() *SQLParseConfig

type SQLParser

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

func NewParserByLexer

func NewParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLParser

func NewParserBySQL

func NewParserBySQL(sourceSQL string, dbType db.Type, config *SQLParseConfig) *SQLParser

func (*SQLParser) Accept

func (sp *SQLParser) Accept(kind *Kind) bool

func (*SQLParser) AcceptAndNextToken

func (sp *SQLParser) AcceptAndNextToken(kind *Kind) bool

func (*SQLParser) AcceptAndNextTokenWithError

func (sp *SQLParser) AcceptAndNextTokenWithError(kind *Kind, error bool) bool

func (*SQLParser) AcceptWithError

func (sp *SQLParser) AcceptWithError(kind *Kind, error bool) bool

func (*SQLParser) ClearComments

func (sp *SQLParser) ClearComments()

func (*SQLParser) Comments

func (sp *SQLParser) Comments() []ast.ISQLComment

func (*SQLParser) Config

func (sp *SQLParser) Config() *SQLParseConfig

func (*SQLParser) DBType

func (sp *SQLParser) DBType() db.Type

func (*SQLParser) IntegerValue

func (sp *SQLParser) IntegerValue() int64

func (*SQLParser) Kind

func (sp *SQLParser) Kind() *Kind

func (*SQLParser) Lexer

func (sp *SQLParser) Lexer() ISQLLexer

func (*SQLParser) Mark

func (sp *SQLParser) Mark() *Mark

func (*SQLParser) Reset

func (sp *SQLParser) Reset() bool

func (*SQLParser) ResetWithMark

func (sp *SQLParser) ResetWithMark(mark *Mark) bool

func (*SQLParser) SetConfig

func (sp *SQLParser) SetConfig(config *SQLParseConfig)

func (*SQLParser) SetLexer

func (sp *SQLParser) SetLexer(lexer ISQLLexer)

func (*SQLParser) StringValue

func (sp *SQLParser) StringValue() string

func (*SQLParser) SyntaxError

func (sp *SQLParser) SyntaxError() string

func (*SQLParser) Token

func (sp *SQLParser) Token() *SQLToken

func (*SQLParser) UnSupport

func (sp *SQLParser) UnSupport() string

type SQLProcedureStatementParser

type SQLProcedureStatementParser struct {
	*SQLStatementParser
}

func NewProcedureStatementParserByExprParser

func NewProcedureStatementParserByExprParser(exprParser ISQLExprParser) *SQLProcedureStatementParser

func NewProcedureStatementParserByLexer

func NewProcedureStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLProcedureStatementParser

func NewProcedureStatementParserBySQL

func NewProcedureStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLProcedureStatementParser

func (*SQLProcedureStatementParser) ParseAlter

func (*SQLProcedureStatementParser) ParseCreate

func (*SQLProcedureStatementParser) ParseDrop

type SQLRoleStatementParser

type SQLRoleStatementParser struct {
	*SQLStatementParser
}

func NewRoleStatementParserByExprParser

func NewRoleStatementParserByExprParser(exprParser ISQLExprParser) *SQLRoleStatementParser

func NewRoleStatementParserByLexer

func NewRoleStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLRoleStatementParser

func NewRoleStatementParserBySQL

func NewRoleStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLRoleStatementParser

func (*SQLRoleStatementParser) ParseAlter

func (*SQLRoleStatementParser) ParseCreate

*

  • CREATE ROLE <role name> [ WITH ADMIN <grantor> ]

func (*SQLRoleStatementParser) ParseDrop

*

  • DROP ROLE <role name>

type SQLSchemaStatementParser

type SQLSchemaStatementParser struct {
	*SQLStatementParser
}

func NewSchemaStatementParserByExprParser

func NewSchemaStatementParserByExprParser(exprParser ISQLExprParser) *SQLSchemaStatementParser

func NewSchemaStatementParserByLexer

func NewSchemaStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLSchemaStatementParser

func NewSchemaStatementParserBySQL

func NewSchemaStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLSchemaStatementParser

func (*SQLSchemaStatementParser) ParseAlter

func (*SQLSchemaStatementParser) ParseCreate

func (*SQLSchemaStatementParser) ParseDrop

type SQLSeCharsetStatementParser

type SQLSeCharsetStatementParser struct {
	*SQLStatementParser
}

*

*

func NewSetCharsetStatementParserByExprParser

func NewSetCharsetStatementParserByExprParser(exprParser ISQLExprParser) *SQLSeCharsetStatementParser

func (*SQLSeCharsetStatementParser) Parse

type SQLSelectStatementParser

type SQLSelectStatementParser struct {
	*SQLStatementParser
}

func NewSelectStatementParserByExprParser

func NewSelectStatementParserByExprParser(exprParser ISQLExprParser) *SQLSelectStatementParser

func NewSelectStatementParserByLexer

func NewSelectStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLSelectStatementParser

func NewSelectStatementParserBySQL

func NewSelectStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLSelectStatementParser

func (*SQLSelectStatementParser) Parse

type SQLSequenceStatementParser

type SQLSequenceStatementParser struct {
	*SQLStatementParser
}

func NewSequenceStatementParserByExprParser

func NewSequenceStatementParserByExprParser(exprParser ISQLExprParser) *SQLSequenceStatementParser

func NewSequenceStatementParserByLexer

func NewSequenceStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLSequenceStatementParser

func NewSequenceStatementParserBySQL

func NewSequenceStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLSequenceStatementParser

func (*SQLSequenceStatementParser) ParseAlter

func (*SQLSequenceStatementParser) ParseCreate

func (*SQLSequenceStatementParser) ParseDrop

type SQLServerStatementParser

type SQLServerStatementParser struct {
	*SQLStatementParser
}

func NewServerStatementParserByExprParser

func NewServerStatementParserByExprParser(exprParser ISQLExprParser) *SQLServerStatementParser

func (*SQLServerStatementParser) ParseAlter

func (*SQLServerStatementParser) ParseCreate

func (*SQLServerStatementParser) ParseDrop

type SQLSetCharacterSetStatementParser

type SQLSetCharacterSetStatementParser struct {
	*SQLStatementParser
}

*

*

func NewSetCharacterSetStatementParserByExprParser

func NewSetCharacterSetStatementParserByExprParser(exprParser ISQLExprParser) *SQLSetCharacterSetStatementParser

func (*SQLSetCharacterSetStatementParser) Parse

type SQLSetNamesStatementParser

type SQLSetNamesStatementParser struct {
	*SQLStatementParser
}

*

*

func NewSetNamesStatementParserByExprParser

func NewSetNamesStatementParserByExprParser(exprParser ISQLExprParser) *SQLSetNamesStatementParser

func (*SQLSetNamesStatementParser) Parse

type SQLSetVariableAssignmentStatementParser

type SQLSetVariableAssignmentStatementParser struct {
	*SQLStatementParser
}

func NewSetVariableAssignmentStatementParserByExprParser

func NewSetVariableAssignmentStatementParserByExprParser(exprParser ISQLExprParser) *SQLSetVariableAssignmentStatementParser

func (*SQLSetVariableAssignmentStatementParser) Parse

type SQLShowCreateDatabaseParser

type SQLShowCreateDatabaseParser struct {
	*SQLStatementParser
}

func NewShowCreateDatabaseByExprParser

func NewShowCreateDatabaseByExprParser(exprParser ISQLExprParser) *SQLShowCreateDatabaseParser

func NewShowCreateDatabaseByLexer

func NewShowCreateDatabaseByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLShowCreateDatabaseParser

func NewShowCreateDatabaseBySQL

func NewShowCreateDatabaseBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLShowCreateDatabaseParser

func (*SQLShowCreateDatabaseParser) Parse

type SQLShowCreateEventParser

type SQLShowCreateEventParser struct {
	*SQLStatementParser
}

func NewShowCreateEventByExprParser

func NewShowCreateEventByExprParser(exprParser ISQLExprParser) *SQLShowCreateEventParser

func NewShowCreateEventByLexer

func NewShowCreateEventByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLShowCreateEventParser

func NewShowCreateEventBySQL

func NewShowCreateEventBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLShowCreateEventParser

func (*SQLShowCreateEventParser) Parse

type SQLShowCreateFunctionParser

type SQLShowCreateFunctionParser struct {
	*SQLStatementParser
}

func NewShowCreateFunctionByExprParser

func NewShowCreateFunctionByExprParser(exprParser ISQLExprParser) *SQLShowCreateFunctionParser

func NewShowCreateFunctionByLexer

func NewShowCreateFunctionByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLShowCreateFunctionParser

func NewShowCreateFunctionBySQL

func NewShowCreateFunctionBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLShowCreateFunctionParser

func (*SQLShowCreateFunctionParser) Parse

type SQLShowCreateProcedureParser

type SQLShowCreateProcedureParser struct {
	*SQLStatementParser
}

func NewShowCreateProcedureByExprParser

func NewShowCreateProcedureByExprParser(exprParser ISQLExprParser) *SQLShowCreateProcedureParser

func NewShowCreateProcedureByLexer

func NewShowCreateProcedureByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLShowCreateProcedureParser

func NewShowCreateProcedureBySQL

func NewShowCreateProcedureBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLShowCreateProcedureParser

func (*SQLShowCreateProcedureParser) Parse

type SQLShowCreateTableParser

type SQLShowCreateTableParser struct {
	*SQLStatementParser
}

func NewShowCreateTableByExprParser

func NewShowCreateTableByExprParser(exprParser ISQLExprParser) *SQLShowCreateTableParser

func NewShowCreateTableByLexer

func NewShowCreateTableByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLShowCreateTableParser

func NewShowCreateTableBySQL

func NewShowCreateTableBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLShowCreateTableParser

func (*SQLShowCreateTableParser) Parse

type SQLShowCreateTriggerParser

type SQLShowCreateTriggerParser struct {
	*SQLStatementParser
}

func NewShowCreateTriggerByExprParser

func NewShowCreateTriggerByExprParser(exprParser ISQLExprParser) *SQLShowCreateTriggerParser

func NewShowCreateTriggerByLexer

func NewShowCreateTriggerByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLShowCreateTriggerParser

func NewShowCreateTriggerBySQL

func NewShowCreateTriggerBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLShowCreateTriggerParser

func (*SQLShowCreateTriggerParser) Parse

type SQLShowCreateViewParser

type SQLShowCreateViewParser struct {
	*SQLStatementParser
}

func NewShowCreateViewByExprParser

func NewShowCreateViewByExprParser(exprParser ISQLExprParser) *SQLShowCreateViewParser

func NewShowCreateViewByLexer

func NewShowCreateViewByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLShowCreateViewParser

func NewShowCreateViewBySQL

func NewShowCreateViewBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLShowCreateViewParser

func (*SQLShowCreateViewParser) Parse

type SQLShowDatabasesParser

type SQLShowDatabasesParser struct {
	*SQLStatementParser
}

func NewShowDatabasesByExprParser

func NewShowDatabasesByExprParser(exprParser ISQLExprParser) *SQLShowDatabasesParser

func NewShowDatabasesByLexer

func NewShowDatabasesByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLShowDatabasesParser

func NewShowDatabasesBySQL

func NewShowDatabasesBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLShowDatabasesParser

func (*SQLShowDatabasesParser) Parse

type SQLStatementParser

type SQLStatementParser struct {
	*SQLParser
	// contains filtered or unexported fields
}

func NewStatementParserByExprParser

func NewStatementParserByExprParser(exprParser ISQLExprParser) *SQLStatementParser

func NewStatementParserByLexer

func NewStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLStatementParser

func NewStatementParserBySQL

func NewStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLStatementParser

func (*SQLStatementParser) ExprParser

func (x *SQLStatementParser) ExprParser() ISQLExprParser

func (*SQLStatementParser) SetExprParser

func (x *SQLStatementParser) SetExprParser(exprParser ISQLExprParser)

type SQLSynonymStatementParser

type SQLSynonymStatementParser struct {
	*SQLStatementParser
}

func NewSynonymStatementParserByExprParser

func NewSynonymStatementParserByExprParser(exprParser ISQLExprParser) *SQLSynonymStatementParser

func NewSynonymStatementParserByLexer

func NewSynonymStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLSynonymStatementParser

func NewSynonymStatementParserBySQL

func NewSynonymStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLSynonymStatementParser

func (*SQLSynonymStatementParser) ParseAlter

func (*SQLSynonymStatementParser) ParseCreate

func (*SQLSynonymStatementParser) ParseDrop

type SQLTableStatementParser

type SQLTableStatementParser struct {
	*SQLStatementParser
}

func NewTableStatementParserByExprParser

func NewTableStatementParserByExprParser(exprParser ISQLExprParser) *SQLTableStatementParser

func NewTableStatementParserByLexer

func NewTableStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLTableStatementParser

func NewTableStatementParserBySQL

func NewTableStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLTableStatementParser

func (*SQLTableStatementParser) ParseAlter

*

func (*SQLTableStatementParser) ParseDrop

type SQLToken

type SQLToken struct {
	Kind       *Kind
	Start, End int
	Line, Col  int
}

func NewToken

func NewToken(kind *Kind, start int, end int, Line int, Col int) *SQLToken

func (*SQLToken) Error

func (token *SQLToken) Error() string

func (*SQLToken) String

func (token *SQLToken) String() string

func (*SQLToken) UnSupport

func (token *SQLToken) UnSupport() string

type SQLTriggerStatementParser

type SQLTriggerStatementParser struct {
	*SQLStatementParser
}

func NewTriggerStatementParserByExprParser

func NewTriggerStatementParserByExprParser(exprParser ISQLExprParser) *SQLTriggerStatementParser

func NewTriggerStatementParserByLexer

func NewTriggerStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLTriggerStatementParser

func NewTriggerStatementParserBySQL

func NewTriggerStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLTriggerStatementParser

func (*SQLTriggerStatementParser) ParseAlter

func (*SQLTriggerStatementParser) ParseCreate

func (*SQLTriggerStatementParser) ParseDrop

type SQLTypeBodyStatementParser

type SQLTypeBodyStatementParser struct {
	*SQLStatementParser
}

func NewTypeBodyStatementParserByExprParser

func NewTypeBodyStatementParserByExprParser(exprParser ISQLExprParser) *SQLTypeBodyStatementParser

func NewTypeBodyStatementParserByLexer

func NewTypeBodyStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLTypeBodyStatementParser

func NewTypeBodyStatementParserBySQL

func NewTypeBodyStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLTypeBodyStatementParser

func (*SQLTypeBodyStatementParser) ParseAlter

func (*SQLTypeBodyStatementParser) ParseCreate

func (*SQLTypeBodyStatementParser) ParseDrop

type SQLTypeStatementParser

type SQLTypeStatementParser struct {
	*SQLStatementParser
}

func NewTypeStatementParserByExprParser

func NewTypeStatementParserByExprParser(exprParser ISQLExprParser) *SQLTypeStatementParser

func NewTypeStatementParserByLexer

func NewTypeStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLTypeStatementParser

func NewTypeStatementParserBySQL

func NewTypeStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLTypeStatementParser

func (*SQLTypeStatementParser) ParseAlter

func (*SQLTypeStatementParser) ParseCreate

func (*SQLTypeStatementParser) ParseDrop

type SQLUpdateStatementParser

type SQLUpdateStatementParser struct {
	*SQLStatementParser
}

func NewUpdateStatementParserByExprParser

func NewUpdateStatementParserByExprParser(exprParser ISQLExprParser) *SQLUpdateStatementParser

func NewUpdateStatementParserByLexer

func NewUpdateStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLUpdateStatementParser

func NewUpdateStatementParserBySQL

func NewUpdateStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLUpdateStatementParser

func (*SQLUpdateStatementParser) Parse

type SQLUseStatementParser

type SQLUseStatementParser struct {
	*SQLStatementParser
}

func NewUseStatementParserByExprParser

func NewUseStatementParserByExprParser(exprParser ISQLExprParser) *SQLUseStatementParser

func (*SQLUseStatementParser) Parse

type SQLUserStatementParser

type SQLUserStatementParser struct {
	*SQLStatementParser
}

func NewUserStatementParserByExprParser

func NewUserStatementParserByExprParser(exprParser ISQLExprParser) *SQLUserStatementParser

func NewUserStatementParserByLexer

func NewUserStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLUserStatementParser

func NewUserStatementParserBySQL

func NewUserStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLUserStatementParser

func (*SQLUserStatementParser) ParseAlter

func (*SQLUserStatementParser) ParseCreate

func (*SQLUserStatementParser) ParseDrop

type SQLViewStatementParser

type SQLViewStatementParser struct {
	*SQLStatementParser
}

func NewViewStatementParserByExprParser

func NewViewStatementParserByExprParser(exprParser ISQLExprParser) *SQLViewStatementParser

func NewViewStatementParserByLexer

func NewViewStatementParserByLexer(lexer ISQLLexer, dbType db.Type, config *SQLParseConfig) *SQLViewStatementParser

func NewViewStatementParserBySQL

func NewViewStatementParserBySQL(sql string, dbType db.Type, config *SQLParseConfig) *SQLViewStatementParser

func (*SQLViewStatementParser) ParseAlter

*

*

func (*SQLViewStatementParser) ParseCreate

*

*

func (*SQLViewStatementParser) ParseDrop

*

func (*SQLViewStatementParser) ParseViewElement

func (sp *SQLViewStatementParser) ParseViewElement() view2.ISQLViewElement

Jump to

Keyboard shortcuts

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