mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-07 18:00:25 +08:00
fix: file文件缺失
This commit is contained in:
@@ -347,6 +347,25 @@ func (v *MysqlVisitor) VisitAtomTableItem(ctx *mysqlparser.AtomTableItemContext)
|
||||
return tableSourceItem
|
||||
}
|
||||
|
||||
func (v *MysqlVisitor) VisitSubqueryTableItem(ctx *mysqlparser.SubqueryTableItemContext) interface{} {
|
||||
sti := new(sqlstmt.SubqueryTableItem)
|
||||
sti.Node = sqlstmt.NewNode(ctx.GetParser(), ctx)
|
||||
|
||||
// 解析子查询
|
||||
if ss := ctx.SelectStatement(); ss != nil {
|
||||
sti.SubQuery = ss.Accept(v).(sqlstmt.ISelectStmt)
|
||||
}
|
||||
|
||||
// 获取别名
|
||||
if alias := ctx.GetAlias(); alias != nil {
|
||||
sti.Alias = alias.GetText()
|
||||
} else if uid := ctx.Uid(); uid != nil {
|
||||
sti.Alias = uid.GetText()
|
||||
}
|
||||
|
||||
return sti
|
||||
}
|
||||
|
||||
func (v *MysqlVisitor) VisitInnerJoin(ctx *mysqlparser.InnerJoinContext) interface{} {
|
||||
ij := new(sqlstmt.InnerJoin)
|
||||
ij.Node = sqlstmt.NewNode(ctx.GetParser(), ctx)
|
||||
|
||||
Reference in New Issue
Block a user