ESQL statements

Start of changeThe following table summarizes the ESQL statements and what they do.End of change

Statement type Description
Basic statements:
BEGIN ... END statement Gives the statements defined within the BEGIN and END keywords the status of a single statement.
CALL statement Start of changeInvokes a user-written routine that has been defined using a CREATE FUNCTION or CREATE PROCEDURE statement.End of change
CASE statement Uses rules defined in WHEN clauses to select a block of statements to execute.
Start of changeCREATE FUNCTION statementEnd of change Start of changeLike CREATE PROCEDURE, CREATE FUNCTION defines a user-written routine. (The few differences between CREATE FUNCTION and CREATE ROUTINE are described in the reference material.)End of change
Start of changeCREATE MODULE statementEnd of change Start of changeCreates a module (a named container associated with a node).End of change
Start of changeCREATE PROCEDURE statementEnd of change Start of changeLike CREATE FUNCTION, CREATE PROCEDURE defines a user-written routine. (The few differences between CREATE FUNCTION and CREATE ROUTINE are described in the reference material.)End of change
DECLARE statement Declares one or more variables that can be used to store temporary values.
IF statement Processes a set of statements based on the result of evaluating condition expressions.
ITERATE statement Abandons processing the current iteration of the containing WHILE, REPEAT, LOOP, or BEGIN statement, and might start the next iteration.
LEAVE statement Abandons processing the current iteration of the containing WHILE, REPEAT, LOOP or BEGIN statement, and stops looping.
LOOP statement Processes a sequence of statements repeatedly and unconditionally.
REPEAT statement Processes a sequence of statements and then evaluates a condition expression. Start of changeIf the expression evaluates to TRUE, executes the statements again.End of change
RETURN statement Stops processing the current function or procedure and passes control back to the caller.
SET statement Evaluates a source expression, and assigns the result to the target entity.
THROW statement Start of changeGenerates a user exception.End of change
WHILE statement Evaluates a condition expression, and if it is TRUE executes a sequence of statements.
Message tree manipulation statements:
ATTACH statement Attaches a portion of a message tree into a new position in the message hierarchy.
CREATE statement Creates a new message field.
DELETE statement Detaches and destroys a portion of a message tree, allowing its memory to be reused.
DETACH statement Detaches a portion of a message tree without deleting it.
FOR statement Iterates through a list (for example, a message array).
MOVE statement Changes the field pointed to by a target reference variable.
Database update statements:
DELETE FROM statement Deletes rows from a table in an external database based on a search condition.
INSERT statement Adds a new row to an external database.
PASSTHRU statement Takes a character value and passes it as an SQL statement to an external database.
UPDATE statement Updates the values of specified rows and columns in a table in an external database.
Node interaction statements:
PROPAGATE statement Propagates a message to the downstream nodes within the message flow.
Other statements:
BROKER SCHEMA statement This statement is optional and is used in an ESQL file to explicitly identify the schema that contains the file.
EVAL statement Takes a character value, interprets it as an SQL statement, and executes it.