UpdateInfo ui = this.updateInfo; if (!first) { this.updateInfo = new UpdateInfo(); this.updateInfo.deleteType = ui.deleteType; this.updateInfo.insertType = ui.insertType; if (this.updateInfo.getDeleteValidationError() != null) { ui.setDeleteValidationError(this.updateInfo.getDeleteValidationError()); if (this.updateInfo.getUpdateValidationError() != null) { ui.setUpdateValidationError(this.updateInfo.getUpdateValidationError()); if (this.updateInfo.getInsertValidationError() != null) { ui.setInsertValidationError(this.updateInfo.getInsertValidationError());
if (info != null && info.isInherentInsert()) { UpdateMapping mapping = info.findInsertUpdateMapping(insert, true); if (mapping == null) { throw new QueryValidatorException(QueryPlugin.Event.TEIID30375, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30375, insert.getVariables()));
public UpdateMapping findInsertUpdateMapping(Insert insert, boolean rewrite) throws QueryValidatorException { if (getUnionBranches().isEmpty()) { return findUpdateMapping(insert.getVariables(), true); info = info.getUnionBranches().get(partition - 1); UpdateMapping mapping = info.findUpdateMapping(variables, true); if (rewrite && mapping != null && !filteredColumns.isEmpty()) { for (ElementSymbol elementSymbol : filteredColumns) {
if (nestedCommand != null) { UpdateInfo info = ProcedureContainerResolver.getUpdateInfo(group, metadata); if (info != null && info.getPartitionInfo() != null && !info.getPartitionInfo().isEmpty()) { Map<ElementSymbol, List<Set<Constant>>> partitionInfo = info.getPartitionInfo(); if (group.getDefinition() != null) { partitionInfo = remapPartitionInfo(group, partitionInfo);
if (nestedCommand != null) { UpdateInfo info = ProcedureContainerResolver.getUpdateInfo(group, metadata); if (info != null && info.getPartitionInfo() != null && !info.getPartitionInfo().isEmpty()) { Map<ElementSymbol, List<Set<Constant>>> partitionInfo = info.getPartitionInfo(); if (group.getDefinition() != null) { partitionInfo = remapPartitionInfo(group, partitionInfo);
if (nestedCommand != null) { UpdateInfo info = ProcedureContainerResolver.getUpdateInfo(group, metadata); if (info != null && info.getPartitionInfo() != null && !info.getPartitionInfo().isEmpty()) { Map<ElementSymbol, List<Set<Constant>>> partitionInfo = info.getPartitionInfo(); if (group.getDefinition() != null) { partitionInfo = remapPartitionInfo(group, partitionInfo);
UpdateInfo ui = this.updateInfo; if (!first) { this.updateInfo = new UpdateInfo(); this.updateInfo.deleteType = ui.deleteType; this.updateInfo.insertType = ui.insertType; if (this.updateInfo.getDeleteValidationError() != null) { ui.setDeleteValidationError(this.updateInfo.getDeleteValidationError()); if (this.updateInfo.getUpdateValidationError() != null) { ui.setUpdateValidationError(this.updateInfo.getUpdateValidationError()); if (this.updateInfo.getInsertValidationError() != null) { ui.setInsertValidationError(this.updateInfo.getInsertValidationError());
UpdateInfo ui = this.updateInfo; if (!first) { this.updateInfo = new UpdateInfo(); this.updateInfo.deleteType = ui.deleteType; this.updateInfo.insertType = ui.insertType; if (this.updateInfo.getDeleteValidationError() != null) { ui.setDeleteValidationError(this.updateInfo.getDeleteValidationError()); if (this.updateInfo.getUpdateValidationError() != null) { ui.setUpdateValidationError(this.updateInfo.getUpdateValidationError()); if (this.updateInfo.getInsertValidationError() != null) { ui.setInsertValidationError(this.updateInfo.getInsertValidationError());
public UpdateMapping findInsertUpdateMapping(Insert insert, boolean rewrite) throws QueryValidatorException { if (getUnionBranches().isEmpty()) { return findUpdateMapping(insert.getVariables(), true); info = info.getUnionBranches().get(partition - 1); UpdateMapping mapping = info.findUpdateMapping(variables, true); if (rewrite && mapping != null && !filteredColumns.isEmpty()) { for (ElementSymbol elementSymbol : filteredColumns) {
public UpdateMapping findInsertUpdateMapping(Insert insert, boolean rewrite) throws QueryValidatorException { if (getUnionBranches().isEmpty()) { return findUpdateMapping(insert.getVariables(), true); info = info.getUnionBranches().get(partition - 1); UpdateMapping mapping = info.findUpdateMapping(variables, true); if (rewrite && mapping != null && !filteredColumns.isEmpty()) { for (ElementSymbol elementSymbol : filteredColumns) {
TeiidComponentException, QueryResolverException, TeiidProcessingException { UpdateMapping mapping = info.findUpdateMapping(update.getChangeList().getClauseMap().keySet(), false); if (mapping == null) { throw new QueryValidatorException(QueryPlugin.Event.TEIID30376, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30376, update.getChangeList().getClauseMap().keySet())); if (info.isSimple()) { Collection<ElementSymbol> elements = getAllElementsUsed(update, update.getGroup()); UpdateMapping fullMapping = info.findUpdateMapping(elements, false); if (fullMapping != null) { update.setGroup(mapping.getGroup().clone()); if (info.getViewDefinition().getCriteria() != null) { update.setCriteria(Criteria.combineCriteria(update.getCriteria(), (Criteria)info.getViewDefinition().getCriteria().clone())); Query query = (Query)info.getViewDefinition().clone(); query.setOrderBy(null); SymbolMap expressionMapping = SymbolMap.createSymbolMap(update.getGroup(), query.getProjectedSymbols(), metadata);
if (info != null && info.isInherentInsert()) { UpdateMapping mapping = info.findInsertUpdateMapping(insert, true); if (mapping == null) { throw new QueryValidatorException(QueryPlugin.Event.TEIID30375, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30375, insert.getVariables()));
TeiidComponentException, QueryResolverException, TeiidProcessingException { UpdateMapping mapping = info.findUpdateMapping(update.getChangeList().getClauseMap().keySet(), false); if (mapping == null) { throw new QueryValidatorException(QueryPlugin.Event.TEIID30376, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30376, update.getChangeList().getClauseMap().keySet())); if (info.isSimple()) { Collection<ElementSymbol> elements = getAllElementsUsed(update, update.getGroup()); UpdateMapping fullMapping = info.findUpdateMapping(elements, false); if (fullMapping != null) { update.setGroup(mapping.getGroup().clone()); if (info.getViewDefinition().getCriteria() != null) { update.setCriteria(Criteria.combineCriteria(update.getCriteria(), (Criteria)info.getViewDefinition().getCriteria().clone())); Query query = (Query)info.getViewDefinition().clone(); query.setOrderBy(null); SymbolMap expressionMapping = SymbolMap.createSymbolMap(update.getGroup(), query.getProjectedSymbols(), metadata);
if (info != null && info.isInherentInsert()) { UpdateMapping mapping = info.findInsertUpdateMapping(insert, true); if (mapping == null) { throw new QueryValidatorException(QueryPlugin.Event.TEIID30375, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30375, insert.getVariables()));
TeiidComponentException, QueryResolverException, TeiidProcessingException { UpdateMapping mapping = info.findUpdateMapping(update.getChangeList().getClauseMap().keySet(), false); if (mapping == null) { throw new QueryValidatorException(QueryPlugin.Event.TEIID30376, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30376, update.getChangeList().getClauseMap().keySet())); if (info.isSimple()) { Collection<ElementSymbol> elements = getAllElementsUsed(update, update.getGroup()); UpdateMapping fullMapping = info.findUpdateMapping(elements, false); if (fullMapping != null) { update.setGroup(mapping.getGroup().clone()); if (info.getViewDefinition().getCriteria() != null) { update.setCriteria(Criteria.combineCriteria(update.getCriteria(), (Criteria)info.getViewDefinition().getCriteria().clone())); Query query = (Query)info.getViewDefinition().clone(); query.setOrderBy(null); SymbolMap expressionMapping = SymbolMap.createSymbolMap(update.getGroup(), query.getProjectedSymbols(), metadata);
validateMultisourceInsert(obj.getGroup()); if (obj.getUpdateInfo() != null && obj.getUpdateInfo().isInherentInsert()) { validateUpdate(obj, Command.TYPE_INSERT, obj.getUpdateInfo()); try { if (obj.getUpdateInfo().findInsertUpdateMapping(obj, false) == null) { handleValidationError(QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30376, obj.getVariables()), obj);
if (info != null && info.isInherentUpdate()) { if (!info.getUnionBranches().isEmpty()) { List<Command> batchedUpdates = new ArrayList<Command>(info.getUnionBranches().size() + 1); for (UpdateInfo branchInfo : info.getUnionBranches()) { batchedUpdates.add(rewriteInherentUpdate((Update)update.clone(), branchInfo));
validateMultisourceInsert(obj.getGroup()); if (obj.getUpdateInfo() != null && obj.getUpdateInfo().isInherentInsert()) { validateUpdate(obj, Command.TYPE_INSERT, obj.getUpdateInfo()); try { if (obj.getUpdateInfo().findInsertUpdateMapping(obj, false) == null) { handleValidationError(QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30376, obj.getVariables()), obj);
validateMultisourceInsert(obj.getGroup()); if (obj.getUpdateInfo() != null && obj.getUpdateInfo().isInherentInsert()) { validateUpdate(obj, Command.TYPE_INSERT, obj.getUpdateInfo()); try { if (obj.getUpdateInfo().findInsertUpdateMapping(obj, false) == null) { handleValidationError(QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30376, obj.getVariables()), obj);
if (info != null && info.isInherentUpdate()) { if (!info.getUnionBranches().isEmpty()) { List<Command> batchedUpdates = new ArrayList<Command>(info.getUnionBranches().size() + 1); for (UpdateInfo branchInfo : info.getUnionBranches()) { batchedUpdates.add(rewriteInherentUpdate((Update)update.clone(), branchInfo));