Package org.teiid.query.sql.proc

Examples of org.teiid.query.sql.proc.TriggerAction


      TempMetadataStore childMetadata = new TempMetadataStore();
      TempMetadataAdapter tma = new TempMetadataAdapter(metadata, childMetadata);
      GroupContext externalGroups = new GroupContext();

    if (currentCommand instanceof TriggerAction) {
      TriggerAction ta = (TriggerAction)currentCommand;
      ta.setView(container);
        //TODO: it seems easier to just inline the handling here rather than have each of the resolvers check for trigger actions
        List<ElementSymbol> viewElements = ResolverUtil.resolveElementsInGroup(ta.getView(), metadata);
        if (type == Command.TYPE_UPDATE || type == Command.TYPE_INSERT) {
          ProcedureContainerResolver.addChanging(tma.getMetadataStore(), externalGroups, viewElements);
          ProcedureContainerResolver.addScalarGroup(SQLConstants.Reserved.NEW, tma.getMetadataStore(), externalGroups, viewElements, false);
        }
        if (type == Command.TYPE_UPDATE || type == Command.TYPE_DELETE) {
View Full Code Here


        ((CreateUpdateProcedureCommand)c).setUserCommand(container);
      }
    }
    if (c != null) {
      if (c instanceof TriggerAction) {
        TriggerAction ta = (TriggerAction)c;
        ProcessorPlan plan = new TriggerActionPlanner().optimize(container, ta, idGenerator, metadata, capFinder, analysisRecord, context);
          sourceNode.setProperty(NodeConstants.Info.PROCESSOR_PLAN, plan);
          return true;
      }
      if (c.getCacheHint() != null) {
View Full Code Here

     */
    public void resolveCommand(Command command, TempMetadataAdapter metadata, boolean resolveNullLiterals)
        throws QueryMetadataException, QueryResolverException, TeiidComponentException {
     
      if (command instanceof TriggerAction) {
        TriggerAction ta = (TriggerAction)command;
            resolveBlock(new CreateUpdateProcedureCommand(), ta.getBlock(), ta.getExternalGroupContexts(), metadata);
        return;
      }

        CreateUpdateProcedureCommand procCommand = (CreateUpdateProcedureCommand) command;

View Full Code Here

                    subCommand = rewriteCommand(subCommand, false);
                    subCommands.set(i, subCommand);
                }
                break;
            case Command.TYPE_TRIGGER_ACTION:
              TriggerAction ta = (TriggerAction)command;
              ta.setBlock(rewriteBlock(ta.getBlock()));
              break;
    }
       
        this.metadata = oldMetadata;
        this.procCommand = oldProcCommand;
View Full Code Here

TOP

Related Classes of org.teiid.query.sql.proc.TriggerAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.