Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# Query Definition Creation

A query definition is a Java runtime object (similar to a factory class).

Creating a query definition is a separate step from opening and executing a query statement. Creating a query definition is the most expensive step in the process of making the query available for execution. Therefore it is often best done at engine startup. The syntax of the function is:

    Query.create(String QueryDefinitionName, String QueryText, boolean isNativeQueryRawResults);

The `QueryDefinitionName` is used in other functions to identify the query definition. The query text contains the select statement.

For example,

    Query.create("report","select zipcode, total_sales, agent_name from /Concepts/Sales where total_sales > $min");

Where `$min` is a bind variable whose value is provided at runtime.

If a query statement based on this definition is executed and returns a result set, the result set columns would be, `zipcode`, `total_sales`, and `agent_name`, with rows of entity values that match the condition specified at the time the query was executed.

Did you find this helpful?

YesNo
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO BusinessEvents® Enterprise Edition

Copyright © 2004-2024. Cloud Software Group, Inc. All Rights Reserved.