Skip to content

Commit

Permalink
Feat actiontech/dms-ee/issues/125: add SQLObjectTypeServer and some h…
Browse files Browse the repository at this point in the history
…elp func
  • Loading branch information
wangyue committed Jan 31, 2024
1 parent 9a153d1 commit 46ac931
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions sqle/driver/v2/driver_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,17 @@ type SQLObjectOps struct {
Sql SQLInfo
}

func NewSQLObjectOps(sql string) *SQLObjectOps {
return &SQLObjectOps{
ObjectOps: []*SQLObjectOp{},
Sql: SQLInfo{Sql: sql},
}
}

func (s *SQLObjectOps) AddObjectOp(o ...*SQLObjectOp) {
s.ObjectOps = append(s.ObjectOps, o...)
}

type SQLObjectOp struct {
Op SQLOp // 对象操作
Object *SQLObject // 对象
Expand All @@ -335,6 +346,7 @@ const (
SQLObjectTypeTable SQLObjectType = "Table"
SQLObjectTypeSchema SQLObjectType = "Schema"
SQLObjectTypeInstance SQLObjectType = "Instance"
SQLObjectTypeServer SQLObjectType = "Server"
)

type SQLInfo struct {
Expand Down

0 comments on commit 46ac931

Please sign in to comment.