throw new QueryValidatorException(QueryPlugin.Event.TEIID30375, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30375, insert.getVariables())); Map<ElementSymbol, ElementSymbol> symbolMap = mapping.getUpdatableViewSymbols(); List<ElementSymbol> mappedSymbols = new ArrayList<ElementSymbol>(insert.getVariables().size()); for (ElementSymbol symbol : insert.getVariables()) { insert.setGroup(mapping.getGroup().clone()); insert.setUpdateInfo(ProcedureContainerResolver.getUpdateInfo(insert.getGroup(), metadata, Command.TYPE_INSERT, true)); return rewriteInsert(insert);
info = new UpdateMapping(); info.group = es.getGroupSymbol(); info.correlatedName = ((ElementSymbol)ex).getGroupSymbol(); if (!updatable) { this.updateInfo.deleteTarget = info; } else if (!info.getGroup().equals(this.updateInfo.deleteTarget.getGroup())){
info = new UpdateMapping(); info.group = es.getGroupSymbol(); info.correlatedName = ((ElementSymbol)ex).getGroupSymbol(); if (!updatable) { this.updateInfo.deleteTarget = info; } else if (!info.getGroup().equals(this.updateInfo.deleteTarget.getGroup())){
info = new UpdateMapping(); info.group = es.getGroupSymbol(); info.correlatedName = ((ElementSymbol)ex).getGroupSymbol(); if (!updatable) { this.updateInfo.deleteTarget = info; } else if (!info.getGroup().equals(this.updateInfo.deleteTarget.getGroup())){
if (rewrite && mapping != null && !filteredColumns.isEmpty()) { for (ElementSymbol elementSymbol : filteredColumns) { if (mapping.getUpdatableViewSymbols().containsKey(elementSymbol)) { continue;
if (rewrite && mapping != null && !filteredColumns.isEmpty()) { for (ElementSymbol elementSymbol : filteredColumns) { if (mapping.getUpdatableViewSymbols().containsKey(elementSymbol)) { continue;
if (rewrite && mapping != null && !filteredColumns.isEmpty()) { for (ElementSymbol elementSymbol : filteredColumns) { if (mapping.getUpdatableViewSymbols().containsKey(elementSymbol)) { continue;
throw new QueryValidatorException(QueryPlugin.Event.TEIID30376, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30376, update.getChangeList().getClauseMap().keySet())); Map<ElementSymbol, ElementSymbol> symbolMap = mapping.getUpdatableViewSymbols(); if (info.isSimple()) { Collection<ElementSymbol> elements = getAllElementsUsed(update, update.getGroup()); update.setGroup(mapping.getGroup().clone()); for (SetClause clause : update.getChangeList().getClauses()) { clause.setSymbol(symbolMap.get(clause.getSymbol())); query.setCriteria(Criteria.combineCriteria(query.getCriteria(), crit)); GroupSymbol group = mapping.getGroup(); String correlationName = mapping.getCorrelatedName().getName();
throw new QueryValidatorException(QueryPlugin.Event.TEIID30375, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30375, insert.getVariables())); Map<ElementSymbol, ElementSymbol> symbolMap = mapping.getUpdatableViewSymbols(); List<ElementSymbol> mappedSymbols = new ArrayList<ElementSymbol>(insert.getVariables().size()); for (ElementSymbol symbol : insert.getVariables()) { insert.setGroup(mapping.getGroup().clone()); insert.setUpdateInfo(ProcedureContainerResolver.getUpdateInfo(insert.getGroup(), metadata, Command.TYPE_INSERT, true)); return rewriteInsert(insert);
throw new QueryValidatorException(QueryPlugin.Event.TEIID30376, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30376, update.getChangeList().getClauseMap().keySet())); Map<ElementSymbol, ElementSymbol> symbolMap = mapping.getUpdatableViewSymbols(); if (info.isSimple()) { Collection<ElementSymbol> elements = getAllElementsUsed(update, update.getGroup()); update.setGroup(mapping.getGroup().clone()); for (SetClause clause : update.getChangeList().getClauses()) { clause.setSymbol(symbolMap.get(clause.getSymbol())); query.setCriteria(Criteria.combineCriteria(query.getCriteria(), crit)); GroupSymbol group = mapping.getGroup(); String correlationName = mapping.getCorrelatedName().getName();
throw new QueryValidatorException(QueryPlugin.Event.TEIID30375, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30375, insert.getVariables())); Map<ElementSymbol, ElementSymbol> symbolMap = mapping.getUpdatableViewSymbols(); List<ElementSymbol> mappedSymbols = new ArrayList<ElementSymbol>(insert.getVariables().size()); for (ElementSymbol symbol : insert.getVariables()) { insert.setGroup(mapping.getGroup().clone()); insert.setUpdateInfo(ProcedureContainerResolver.getUpdateInfo(insert.getGroup(), metadata, Command.TYPE_INSERT, true)); return rewriteInsert(insert);
throw new QueryValidatorException(QueryPlugin.Event.TEIID30376, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30376, update.getChangeList().getClauseMap().keySet())); Map<ElementSymbol, ElementSymbol> symbolMap = mapping.getUpdatableViewSymbols(); if (info.isSimple()) { Collection<ElementSymbol> elements = getAllElementsUsed(update, update.getGroup()); update.setGroup(mapping.getGroup().clone()); for (SetClause clause : update.getChangeList().getClauses()) { clause.setSymbol(symbolMap.get(clause.getSymbol())); query.setCriteria(Criteria.combineCriteria(query.getCriteria(), crit)); GroupSymbol group = mapping.getGroup(); String correlationName = mapping.getCorrelatedName().getName();
UpdateMapping fullMapping = info.findUpdateMapping(elements, false); if (fullMapping != null) { delete.setGroup(mapping.getGroup().clone()); DeepPostOrderNavigator.doVisit(delete, new ExpressionMappingVisitor(mapping.getUpdatableViewSymbols(), true)); delete.setUpdateInfo(ProcedureContainerResolver.getUpdateInfo(delete.getGroup(), metadata, Command.TYPE_DELETE, true)); if (info.getViewDefinition().getCriteria() != null) { query.setCriteria(Criteria.combineCriteria(query.getCriteria(), crit)); GroupSymbol group = mapping.getGroup(); String correlationName = mapping.getCorrelatedName().getName(); return createDeleteProcedure(delete, query, group, correlationName);
UpdateMapping fullMapping = info.findUpdateMapping(elements, false); if (fullMapping != null) { delete.setGroup(mapping.getGroup().clone()); DeepPostOrderNavigator.doVisit(delete, new ExpressionMappingVisitor(mapping.getUpdatableViewSymbols(), true)); delete.setUpdateInfo(ProcedureContainerResolver.getUpdateInfo(delete.getGroup(), metadata, Command.TYPE_DELETE, true)); if (info.getViewDefinition().getCriteria() != null) { query.setCriteria(Criteria.combineCriteria(query.getCriteria(), crit)); GroupSymbol group = mapping.getGroup(); String correlationName = mapping.getCorrelatedName().getName(); return createDeleteProcedure(delete, query, group, correlationName);
UpdateMapping fullMapping = info.findUpdateMapping(elements, false); if (fullMapping != null) { delete.setGroup(mapping.getGroup().clone()); DeepPostOrderNavigator.doVisit(delete, new ExpressionMappingVisitor(mapping.getUpdatableViewSymbols(), true)); delete.setUpdateInfo(ProcedureContainerResolver.getUpdateInfo(delete.getGroup(), metadata, Command.TYPE_DELETE, true)); if (info.getViewDefinition().getCriteria() != null) { query.setCriteria(Criteria.combineCriteria(query.getCriteria(), crit)); GroupSymbol group = mapping.getGroup(); String correlationName = mapping.getCorrelatedName().getName(); return createDeleteProcedure(delete, query, group, correlationName);