Package org.teiid.query.metadata

Examples of org.teiid.query.metadata.TempMetadataAdapter


        Select select = new Select();
        query.setSelect(select);
        From from = new From();
        from.addClause(new UnaryFromClause(inlineGroup));
        TempMetadataStore store = new TempMetadataStore();
        TempMetadataAdapter tma = new TempMetadataAdapter(metadata, store);
        if (nested instanceof QueryCommand) {
          Query firstProject = ((QueryCommand)nested).getProjectedQuery();
          makeSelectUnique(firstProject.getSelect(), false);
        }
        TempMetadataID gid = store.addTempGroup(inlineGroup.getName(), nested.getProjectedSymbols());
View Full Code Here


        throws QueryResolverException, QueryMetadataException, TeiidComponentException {
        LogManager.logTrace(org.teiid.logging.LogConstants.CTX_QUERY_RESOLVER, new Object[]{"Resolving block", block}); //$NON-NLS-1$
       
        //create a new variable and metadata context for this block so that discovered metadata is not visible else where
        TempMetadataStore store = new TempMetadataStore(new HashMap(metadata.getMetadataStore().getData()));
        metadata = new TempMetadataAdapter(metadata.getMetadata(), store);
        externalGroups = new GroupContext(externalGroups, null);
       
        //create a new variables group for this block
        GroupSymbol variables = ProcedureContainerResolver.addScalarGroup(ProcedureReservedWords.VARIABLES, store, externalGroups, new LinkedList<SingleElementSymbol>());
       
View Full Code Here

                resolveEmbeddedCommand(metadata, externalGroups, cmd);
                List<SingleElementSymbol> symbols = cmd.getProjectedSymbols();
               
                //add the loop cursor group into its own context
                TempMetadataStore store = new TempMetadataStore(new HashMap(metadata.getMetadataStore().getData()));
                metadata = new TempMetadataAdapter(metadata.getMetadata(), store);
                externalGroups = new GroupContext(externalGroups, null);
               
                ProcedureContainerResolver.addScalarGroup(groupName, store, externalGroups, symbols, false);
               
                resolveBlock(command, loopStmt.getBlock(), externalGroups, metadata);
View Full Code Here

 
    static ProcessorPlan helpGetPlan(Command command, QueryMetadataInterface metadata, CapabilitiesFinder capFinder, CommandContext context) throws TeiidException {
    if(DEBUG) System.out.println("\n####################################\n" + command); //$NON-NLS-1$
    AnalysisRecord analysisRecord = new AnalysisRecord(false, DEBUG);
    if (!(metadata instanceof TempMetadataAdapter)) {
      metadata = new TempMetadataAdapter(metadata, new TempMetadataStore());
    }
    context.setMetadata(metadata);
        try {
      QueryResolver.resolveCommand(command, metadata);
       
View Full Code Here

    if (obj instanceof Command) {
      Command command = (Command)obj;
      visitor.currentCommand = command;
            Map tempMetadata = command.getTemporaryMetadata();
            if(tempMetadata != null && !tempMetadata.isEmpty()) {
              visitor.setMetadata(new TempMetadataAdapter(metadata, new TempMetadataStore(tempMetadata)));
            }   
    }
  }
View Full Code Here

        if(multiSourceModelList != null && multiSourceModelList.size() > 0) {
          this.multiSourceModels = multiSourceModelList;
            this.metadata = new MultiSourceMetadataWrapper(this.metadata, this.multiSourceModels);
        }
       
        TempMetadataAdapter tma = new TempMetadataAdapter(metadata, this.tempTableStore.getMetadataStore());
        tma.setSession(true);
        this.metadata = tma;
    }
View Full Code Here

                  tempTableStore = state.sessionTables;
                }
            }
        }
        if(tempTableStore != null) {
            metadata = new TempMetadataAdapter(this.metadata, tempTableStore.getMetadataStore());
        }
       
        if(workItem != null) {
          return getMetadataForCommand(workItem.getOriginalCommand());
        }
View Full Code Here

    private Map[] createProjectedSymbolMetadata(Command originalCommand) throws TeiidComponentException {
        Map[] columnMetadata;
        // Allow command to use temporary metadata
        Map tempMetadata = originalCommand.getTemporaryMetadata();
        if(tempMetadata != null && tempMetadata.size() > 0) {
            TempMetadataAdapter tempFacade = new TempMetadataAdapter(this.metadata, new TempMetadataStore(tempMetadata));
            this.metadata = tempFacade;
        }
       
        List projectedSymbols = originalCommand.getProjectedSymbols();
        columnMetadata = new Map[projectedSymbols.size()];
View Full Code Here

      QueryMetadataInterface metadata) throws QueryParserException,
      QueryResolverException, TeiidComponentException,
      QueryMetadataException {
    ProcedureContainer userCommand = (ProcedureContainer)QueryParser.getQueryParser().parseCommand(userUpdateStr);
        QueryResolver.resolveCommand(userCommand, metadata);
        metadata = new TempMetadataAdapter(metadata, new TempMetadataStore(userCommand.getTemporaryMetadata()));
        return (CreateUpdateProcedureCommand)QueryResolver.expandCommand(userCommand, metadata, null);
  }
View Full Code Here

        this.securityContext.setBatchSize(this.requestMsg.getFetchSize());
       
        this.connector = manager.getExecutionFactory();
      VDBMetaData vdb = requestMsg.getWorkContext().getVDB();
      this.queryMetadata = vdb.getAttachment(QueryMetadataInterface.class);
        this.queryMetadata = new TempMetadataAdapter(this.queryMetadata, new TempMetadataStore());
    this.securityContext.setTransactional(requestMsg.isTransactional());
    }
View Full Code Here

TOP

Related Classes of org.teiid.query.metadata.TempMetadataAdapter

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.