abstract class %ZEN.Component.querySource
This abstract class provides a standard interface for creating a
%ResultSet object that a component can then use to
supply itself with data.
There are several ways to define the creation of a %ResultSet object:
- Define an SQL statement using the sql property.
- Provide the class and name of a class query using the queryClass and queryName properties.
- Define a callback method using the OnCreateResultSet property.
property OnCreateResultSet
as %ZEN.Datatype.delegator(FORMALSPEC="*tSC:%Status,pInfo:%ZEN.Auxiliary.QueryInfo",RETURNTYPE="%ResultSet");
(optional) Name of Server-side callback method to call to create
a %ResultSet object.
This must be the name of a server-only method in the page
class that contains this component.
property OnExecuteResultSet
as %ZEN.Datatype.delegator(FORMALSPEC="pRS:%Library.ResultSet,*tSC:%Status,pInfo:%ZEN.Auxiliary.QueryInfo",RETURNTYPE="%Boolean");
(optional) Name of Server-side callback method to call to execute the
%ResultSet object.
This must be the name of a server-only method in the page
class that contains this table pane.
property columnName
as %ZEN.Datatype.string(ZENEXPRESSION=1);
(optional) Name of a column in the SQL table used to provide data.
If both this and tableName is specified, and no other
columns are defined, then then automatically generated query will use
%ID for the value column and the column specified by columnName
for the display value.
property countRows
as %ZEN.Datatype.integer [ InitialExpression = 0 ];
This property should not be used; it is provided for backward compatibility.
The original implementation of querySource caused the pInfo.rowCount
property to be computed automatically, however this was never used and in
cases where a table did not have an extent bitmap index would cause poor
performance. To get the original behavior set this to 1 (true).
property groupByClause
as %ZEN.Datatype.string(ZENEXPRESSION=1);
(optional) An SQL GROUP BY clause: e.g., "Year,State"
For sources that automatically create an SQL statement, this is
used to create a GROUP BY clause.
property maxRows
as %ZEN.Datatype.integer [ InitialExpression = 100 ];
Maximum number of rows to fetch from the %ResultSet object.
This provides a way to limit the number of rows displayed by a data-aware component.
If this is set to 0, then no limit is enforced; all rows from the query are displayed.
property orderByClause
as %ZEN.Datatype.string(ZENEXPRESSION=1);
(optional) An SQL ORDER BY clause: e.g., "Name,State"
For sources that automatically create an SQL statement, this is
used to create the ORDER BY clause.
property queryClass
as %ZEN.Datatype.className;
(optional) Name of the class containing the class query that will
be used to create a %ResultSet object.
property queryName
as %ZEN.Datatype.classMember(MEMBERTYPE="QUERY");
(optional) Name of the class query that will
be used to create a %ResultSet object.
property sql
as %ZEN.Datatype.sql;
(optional) SQL statement that, if present, will be used to
create a %ResultSet object.
If defined, this takes precedence over
queryClass and queryName.
property tableName
as %ZEN.Datatype.string(ZENEXPRESSION=1);
(optional) Name of an SQL table used to provide data.
For sources that automatically create an SQL statement, this is the table
used in the FROM clause.
If no column information is supplied, then the %ID column of the table will
be used as the SELECT list.
property whereClause
as %ZEN.Datatype.string(ZENEXPRESSION=1);
(optional) An SQL WHERE clause: e.g., "Name='Elvis'"
For sources that automatically create an SQL statement, this is
used to create the WHERE clause.