Search in sources :

Example 1 with ExecuteProcedure

use of org.h2.command.dml.ExecuteProcedure in project h2database by h2database.

the class Parser method parseExecute.

private Prepared parseExecute() {
    ExecuteProcedure command = new ExecuteProcedure(session);
    String procedureName = readAliasIdentifier();
    Procedure p = session.getProcedure(procedureName);
    if (p == null) {
        throw DbException.get(ErrorCode.FUNCTION_ALIAS_NOT_FOUND_1, procedureName);
    }
    command.setProcedure(p);
    if (readIf("(")) {
        for (int i = 0; ; i++) {
            command.setExpression(i, readExpression());
            if (readIf(")")) {
                break;
            }
            read(",");
        }
    }
    return command;
}
Also used : ExecuteProcedure(org.h2.command.dml.ExecuteProcedure) Procedure(org.h2.engine.Procedure) DeallocateProcedure(org.h2.command.ddl.DeallocateProcedure) ExecuteProcedure(org.h2.command.dml.ExecuteProcedure) PrepareProcedure(org.h2.command.ddl.PrepareProcedure) ValueString(org.h2.value.ValueString) AlterTableRenameConstraint(org.h2.command.ddl.AlterTableRenameConstraint) AlterTableAddConstraint(org.h2.command.ddl.AlterTableAddConstraint) AlterTableDropConstraint(org.h2.command.ddl.AlterTableDropConstraint)

Aggregations

AlterTableAddConstraint (org.h2.command.ddl.AlterTableAddConstraint)1 AlterTableDropConstraint (org.h2.command.ddl.AlterTableDropConstraint)1 AlterTableRenameConstraint (org.h2.command.ddl.AlterTableRenameConstraint)1 DeallocateProcedure (org.h2.command.ddl.DeallocateProcedure)1 PrepareProcedure (org.h2.command.ddl.PrepareProcedure)1 ExecuteProcedure (org.h2.command.dml.ExecuteProcedure)1 Procedure (org.h2.engine.Procedure)1 ValueString (org.h2.value.ValueString)1