Package org.voltdb.catalog

Examples of org.voltdb.catalog.StmtParameter


            stmt.fragGUIDs[ii] = Long.parseLong(fragments[ii].getName());
        } // FOR
   
        stmt.numStatementParamJavaTypes = stmt.catStmt.getParameters().size();
        stmt.statementParamJavaTypes = new byte[stmt.numStatementParamJavaTypes];
        StmtParameter parameters[] = stmt.catStmt.getParameters().values();
        for (int ii = 0; ii < stmt.numStatementParamJavaTypes; ii++) {
            stmt.statementParamJavaTypes[ii] = (byte)parameters[ii].getJavatype();
        } // FOR
        stmt.computeHashCode();
    }
View Full Code Here


            if (nextIndex == -1)
                throw new RuntimeException("SQL Statement has more arguments than params.");
            sqlOut.append(sql, lastIndex, nextIndex);
            lastIndex = nextIndex + 1;

            StmtParameter stmtParam = sparams.get(i);
            assert(stmtParam != null);
            VoltType type = VoltType.get((byte) stmtParam.getJavatype());

            if (args[i] == null) {
                sqlOut.append("NULL");
            } else if (args[i] instanceof TimestampType) {
                if (type != VoltType.TIMESTAMP)
View Full Code Here

            assertEquals(entry.get(column_idx).getClass(), Column.class);
            assertEquals(entry.get(param_idx).getClass(), StmtParameter.class);

            Column catalog_col = (Column) entry.get(column_idx);
            StmtParameter catalog_param = (StmtParameter) entry.get(param_idx);

            Pair<Column, Integer> found = null;
            // System.err.println("TARGET: " + catalog_col.fullName() + " <=> "
            // + catalog_param.fullName());
            for (Pair<Column, Integer> pair : expected) {
                // System.err.println(String.format("  COMPARE: %s <=> %d",
                // pair.getFirst().fullName(), pair.getSecond()));
                if (pair.getFirst().equals(catalog_col) && pair.getSecond() == catalog_param.getIndex()) {
                    found = pair;
                    break;
                }
            } // FOR
            if (found == null)
View Full Code Here

        catalogStmt.setSeqscancount(plan.countSeqScans());

        // Input Parameters
        // We will need to update the system catalogs with this new information
        for (int i = 0; i < plan.parameters.length; ++i) {
            StmtParameter catalogParam = catalogStmt.getParameters().add(String.valueOf(i));
            catalogParam.setJavatype(plan.parameters[i].getValueType().getValue());
            catalogParam.setIsarray(plan.parameters[i].getParamIsVector());
            catalogParam.setIndex(i);
        }

        catalogStmt.setReplicatedtabledml(plan.replicatedTableDML);

        // output the explained plan to disk (or caller) for debugging
View Full Code Here

        }

        // Input Parameters
        // We will need to update the system catalogs with this new information
        for (int i = 0; i < plan.parameters.length; ++i) {
            StmtParameter catalogParam = catalogStmt.getParameters().add(String.valueOf(i));
            ParameterValueExpression pve = plan.parameters[i];
            catalogParam.setJavatype(pve.getValueType().getValue());
            catalogParam.setIsarray(pve.getParamIsVector());
            catalogParam.setIndex(i);
        }

        List<PlanNodeList> nodeLists = new ArrayList<PlanNodeList>();
        nodeLists.add(new PlanNodeList(plan.rootPlanGraph));
        if (plan.subPlanGraph != null) {
View Full Code Here

TOP

Related Classes of org.voltdb.catalog.StmtParameter

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.