Skip to content

Commit 46ac931

Browse files
author
wangyue
committed
Feat actiontech/dms-ee/issues/125: add SQLObjectTypeServer and some help func
1 parent 9a153d1 commit 46ac931

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

sqle/driver/v2/driver_interface.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,17 @@ type SQLObjectOps struct {
315315
Sql SQLInfo
316316
}
317317

318+
func NewSQLObjectOps(sql string) *SQLObjectOps {
319+
return &SQLObjectOps{
320+
ObjectOps: []*SQLObjectOp{},
321+
Sql: SQLInfo{Sql: sql},
322+
}
323+
}
324+
325+
func (s *SQLObjectOps) AddObjectOp(o ...*SQLObjectOp) {
326+
s.ObjectOps = append(s.ObjectOps, o...)
327+
}
328+
318329
type SQLObjectOp struct {
319330
Op SQLOp // 对象操作
320331
Object *SQLObject // 对象
@@ -335,6 +346,7 @@ const (
335346
SQLObjectTypeTable SQLObjectType = "Table"
336347
SQLObjectTypeSchema SQLObjectType = "Schema"
337348
SQLObjectTypeInstance SQLObjectType = "Instance"
349+
SQLObjectTypeServer SQLObjectType = "Server"
338350
)
339351

340352
type SQLInfo struct {

0 commit comments

Comments
 (0)