...
|
...
|
@@ -477,36 +477,6 @@ func (ptr *QuerySetService) CreateOrUpdateQuerySetTable(ctx *domain.Context, que |
|
|
if err = ptr.validDependentCircle(ctx, querySet, queryComponents); err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
//var validTables = make([]*domain.Table, 0)
|
|
|
//if len(dependencyTables) > 0 {
|
|
|
// _, tables, err := tableRepository.Find(map[string]interface{}{"context": ctx, "tableIds": dependencyTables})
|
|
|
// if err != nil {
|
|
|
// return nil, err
|
|
|
// }
|
|
|
// tableMap := make(map[int]*domain.Table)
|
|
|
// for i := range tables {
|
|
|
// tableMap[tables[i].TableId] = tables[i]
|
|
|
// }
|
|
|
// for _, c := range queryComponents {
|
|
|
// if t, ok := tableMap[c.MasterTable.TableId]; ok {
|
|
|
// c.MasterTable = domain.NewQueryComponentTable(t)
|
|
|
// }
|
|
|
// }
|
|
|
// for _, t := range validTables {
|
|
|
// if t.TableType == domain.SchemaTable.ToString() || t.TableType == domain.SubProcessTable.ToString() {
|
|
|
// validTables = append(validTables, t)
|
|
|
// }
|
|
|
// }
|
|
|
//}
|
|
|
//
|
|
|
//// 循环依赖判断
|
|
|
//tableDependencyService, _ := NewTableDependencyService(ptr.transactionContext)
|
|
|
//if len(validTables) > 0 {
|
|
|
// tree := tableDependencyService.TableDependTree(validTables, querySet.QuerySetInfo.BindTableId)
|
|
|
// if tableDependencyService.Detect(ctx, tree.EdgesArray()) {
|
|
|
// return nil, NewCircleDependError(tableDependencyService.CircleTable(), querySet)
|
|
|
// }
|
|
|
//}
|
|
|
|
|
|
table.TableInfo.ApplyOnModule = domain.ModuleAll
|
|
|
table.TableInfo.DependencyTables = dependencyTables
|
...
|
...
|
|