Examples of Call


Examples of org.teiid.language.Call

  }
 
  @Override
  public void execute() throws TranslatorException {
    try {
      Call procedure = (Call) this.command;
      List<Argument> arguments = procedure.getArguments();
      String mdxQuery = (String) arguments.get(0).getArgumentValue().getValue();
      stmt = this.connection.createStatement();
     
      cellSet = stmt.executeOlapQuery(mdxQuery);
      CellSetAxis rows = this.cellSet.getAxes().get(Axis.ROWS.axisOrdinal());
View Full Code Here

Examples of org.teiid.language.Call

    // this has two result set columns and 1 out parameter
    int total_columns = 3;
    StoredProcedure command = (StoredProcedure)helpGetCommand("{call pm2.spTest8(?)}", EXAMPLE_BQT); //$NON-NLS-1$     
    command.getInputParameters().get(0).setExpression(new Constant(1));
    Call proc = (Call)new LanguageBridgeFactory(EXAMPLE_BQT).translate(command);

    ProcedureBatchHandler pbh = new ProcedureBatchHandler(proc, exec);

    assertEquals(total_columns, pbh.padRow(Arrays.asList(null, null)).size());
View Full Code Here

Examples of org.teiid.language.Call

    public TestParameterImpl(String name) {
        super(name);
    }

    public static Argument example(int index) throws Exception {
        Call procImpl = TestProcedureImpl.example();
        return procImpl.getArguments().get(index);
    }
View Full Code Here

Examples of org.teiid.language.Call

    public void testGetProcedureName() throws Exception {
        assertEquals("sq3", example().getProcedureName()); //$NON-NLS-1$
    }

    public void testGetParameters() throws Exception {
        Call exec = example();
        assertNotNull(exec.getArguments());
        assertEquals(2, exec.getArguments().size());
    }
View Full Code Here

Examples of org.teiid.language.Call

            for(int i=1; i<inputArgs; i++) {
                sql.append(", null");                 //$NON-NLS-1$
            }
        }
        sql.append(")"); //$NON-NLS-1$
        Call proc = (Call) transUtil.parseCommand(sql.toString());
        return proc;
    }
View Full Code Here

Examples of org.teiid.language.Call

        assertEquals(modeledPrimitiveType, p.getPrimitiveTypeID());
       
    }

    public void testProcedureWithResultSet() throws Exception {
        Call proc = getProcedure("sptest.proc1", 4, CONNECTOR_METADATA_UTILITY);      //$NON-NLS-1$
        List params = proc.getArguments();
        assertEquals(4, params.size());
       
        checkParameter((Argument)params.get(0),
                       "in1", //$NON-NLS-1$
                       "sptest.proc1.in1", //$NON-NLS-1$
View Full Code Here

Examples of org.teiid.language.Call

            }
            Argument arg = new Argument(direction, value, param.getClassType(), metadataParam);
            translatedParameters.add(arg);
        }
                       
        Call call = new Call(removeSchemaName(sp.getProcedureName()), translatedParameters, proc);
        call.setReturnType(returnType);
        return call;
    }
View Full Code Here

Examples of org.teiid.language.Call

            for(int i=1; i<inputArgs; i++) {
                sql.append(", null");                 //$NON-NLS-1$
            }
        }
        sql.append(")"); //$NON-NLS-1$
        Call proc = (Call) transUtil.parseCommand(sql.toString());
        return proc.getMetadataObject();
    }
View Full Code Here

Examples of org.teiid.language.Call

  }

  @Override
  public void execute(ProcedureExecutionParent procedureExecutionParent) throws TranslatorException {
    try {
      Call command = parent.getCommand();
      List<Argument> params = command.getArguments();
     
      Argument object = params.get(OBJECT);
      String objectName = (String) object.getArgumentValue().getValue();
     
      Argument start = params.get(STARTDATE);
View Full Code Here

Examples of org.teiid.language.Call

                sql.append(", ");                 //$NON-NLS-1$
            }
        }
        sql.append(")"); //$NON-NLS-1$
       
        Call proc = (Call) transUtil.parseCommand(sql.toString());
        return proc.getMetadataObject();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.