feat: sql解析器替换、工单统一由‘我的流程’发起、流程定义支持自定义条件触发审批、资源隐藏编号、model支持物理删除等

This commit is contained in:
meilin.huang
2024-10-16 17:24:50 +08:00
parent 43edef412c
commit e135e4ce64
170 changed files with 397197 additions and 1251 deletions

View File

@@ -0,0 +1,135 @@
package sqlstmt
type (
ISelectStmt interface {
INode
isSelect()
}
SelectStmt struct {
*Node
}
QuerySpecification struct {
*Node
SelectElements *SelectElements
From *TableSources
Where IExpr
Limit *Limit
}
SimpleSelectStmt struct {
SelectStmt
QuerySpecification *QuerySpecification
}
UnionSelectStmt struct {
SelectStmt
UnionType string
QuerySpecification *QuerySpecification
QueryExpr *QueryExpr
UnionStmts []*UnionStmt
Limit *Limit
}
// 圆括号查询
ParenthesisSelect struct {
SelectStmt
QueryExpr *QueryExpr
}
QueryExpr struct {
*Node
QuerySpecification *QuerySpecification
QueryExpr *QueryExpr
}
)
func (*SelectStmt) isSelect() {}
// var _ (ISelectStmt) = (*SimpleSelectStmt)(nil)
// var _ (ISelectStmt) = (*SelectStmt)(nil)
// var _ (ISelectStmt) = (*ParenthesisSelect)(nil)
type (
SelectElements struct {
*Node
Star string // 查询所有
Elements []ISelectElement
}
ISelectElement interface {
INode
}
SelectStarElement struct {
*Node
FullId string
}
SelectColumnElement struct {
*Node
FullColumnName *ColumnName
Alias string
}
SelectFunctionElement struct {
*Node
Alias string
}
)
type From struct {
TableSource *ITableSource
}
type Limit struct {
*Node
RowCount int
Offset int
}
type (
IJoinPart interface {
INode
}
JoinPart struct {
*Node
TableSourceItem ITableSourceItem
}
InnerJoin struct {
JoinPart
}
OuterJoin struct {
JoinPart
}
NaturalJoin struct {
JoinPart
}
)
type (
UnionStmt struct {
*Node
UnionType string
QuerySpecification *QuerySpecification
QueryExpr *QueryExpr
}
)