mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-05-20 09:55:25 +08:00
refactor: 移除antlr4减小包体积&ai助手优化
This commit is contained in:
@@ -1,53 +1,9 @@
|
||||
package sqlstmt
|
||||
|
||||
type (
|
||||
IDdlStmt interface {
|
||||
isDdl()
|
||||
}
|
||||
|
||||
DdlStmt struct {
|
||||
*Node
|
||||
}
|
||||
|
||||
CreateDatabase struct {
|
||||
DdlStmt
|
||||
}
|
||||
|
||||
CreateTable struct {
|
||||
DdlStmt
|
||||
}
|
||||
|
||||
CreateIndex struct {
|
||||
DdlStmt
|
||||
}
|
||||
|
||||
AlterTable struct {
|
||||
DdlStmt
|
||||
}
|
||||
|
||||
AlterDatabase struct {
|
||||
DdlStmt
|
||||
}
|
||||
|
||||
DropDatabase struct {
|
||||
DdlStmt
|
||||
}
|
||||
|
||||
DropIndex struct {
|
||||
DdlStmt
|
||||
}
|
||||
|
||||
DropTable struct {
|
||||
DdlStmt
|
||||
}
|
||||
|
||||
DropView struct {
|
||||
DdlStmt
|
||||
}
|
||||
)
|
||||
|
||||
func (d *DdlStmt) isDdl() {}
|
||||
|
||||
func IsDDL(node INode) bool {
|
||||
return true
|
||||
// DdlStmt DDL 语句
|
||||
type DdlStmt struct {
|
||||
Base
|
||||
DdlKind string // CREATE_TABLE, DROP_TABLE, ALTER_TABLE 等
|
||||
}
|
||||
|
||||
func (*DdlStmt) StmtKind() Kind { return KindDdl }
|
||||
|
||||
Reference in New Issue
Block a user