%ZEN.Component.querySource
deprecated 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 Inventory
- OnCreateResultSet
- OnExecuteResultSet
- columnName
- countRows
- groupByClause
- maxRows
- orderByClause
- queryClass
- queryName
- sql
- tableName
- whereClause
Method Inventory
Properties
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.
This must be the name of a server-only method in the page class that contains this component.
Property methods: OnCreateResultSetDisplayToLogical(), OnCreateResultSetGet(), OnCreateResultSetIsValid(), OnCreateResultSetLogicalToDisplay(), OnCreateResultSetLogicalToOdbc(), OnCreateResultSetNormalize(), OnCreateResultSetSet()
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.
This must be the name of a server-only method in the page class that contains this table pane.
Property methods: OnExecuteResultSetDisplayToLogical(), OnExecuteResultSetGet(), OnExecuteResultSetIsValid(), OnExecuteResultSetLogicalToDisplay(), OnExecuteResultSetLogicalToOdbc(), OnExecuteResultSetNormalize(), OnExecuteResultSetSet()
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 an automatically generated query will use %ID for the value column and the column specified by columnName for the display value.
This must contain a valid column name.
If both this and tableName is specified, and no other columns are defined, then an automatically generated query will use %ID for the value column and the column specified by columnName for the display value.
This must contain a valid column name.
Property methods: columnNameDisplayToLogical(), columnNameGet(), columnNameIsValid(), columnNameLogicalToDisplay(), columnNameLogicalToOdbc(), columnNameNormalize(), columnNameSet()
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 methods: countRowsDisplayToLogical(), countRowsGet(), countRowsIsValid(), countRowsLogicalToDisplay(), countRowsLogicalToOdbc(), countRowsNormalize(), countRowsSet()
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.
For sources that automatically create an SQL statement, this is used to create a GROUP BY clause.
Property methods: groupByClauseDisplayToLogical(), groupByClauseGet(), groupByClauseIsValid(), groupByClauseLogicalToDisplay(), groupByClauseLogicalToOdbc(), groupByClauseNormalize(), groupByClauseSet()
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.
If this is set to 0, then no limit is enforced; all rows from the query are displayed.
Property methods: maxRowsDisplayToLogical(), maxRowsGet(), maxRowsIsValid(), maxRowsLogicalToDisplay(), maxRowsLogicalToOdbc(), maxRowsNormalize(), maxRowsSet()
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.
For sources that automatically create an SQL statement, this is used to create the ORDER BY clause.
Property methods: orderByClauseDisplayToLogical(), orderByClauseGet(), orderByClauseIsValid(), orderByClauseLogicalToDisplay(), orderByClauseLogicalToOdbc(), orderByClauseNormalize(), orderByClauseSet()
property queryClass as %ZEN.Datatype.className (ZENENCRYPT = 1);
(optional) Name of the class containing the class query that will
be used to create a %ResultSet object.
This is an encrypted value and cannot be modified on the client.
This is an encrypted value and cannot be modified on the client.
Property methods: queryClassDisplayToLogical(), queryClassGet(), queryClassIsValid(), queryClassLogicalToDisplay(), queryClassLogicalToOdbc(), queryClassNormalize(), queryClassSet()
property queryName as %ZEN.Datatype.classMember (MEMBERTYPE = "QUERY");
(optional) Name of the class query that will
be used to create a %ResultSet object.
Property methods: queryNameDisplayToLogical(), queryNameGet(), queryNameIsValid(), queryNameLogicalToDisplay(), queryNameLogicalToOdbc(), queryNameNormalize(), queryNameSet()
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.
If defined, this takes precedence over queryClass and queryName.
Property methods: sqlDisplayToLogical(), sqlGet(), sqlIsValid(), sqlLogicalToDisplay(), sqlLogicalToOdbc(), sqlNormalize(), sqlSet()
property tableName as %ZEN.Datatype.string (ZENENCRYPT = 1, 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.
This value is encrypted and cannot be modified on the client.
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.
This value is encrypted and cannot be modified on the client.
Property methods: tableNameDisplayToLogical(), tableNameGet(), tableNameIsValid(), tableNameLogicalToDisplay(), tableNameLogicalToOdbc(), tableNameNormalize(), tableNameSet()
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.
For sources that automatically create an SQL statement, this is used to create the WHERE clause.
Property methods: whereClauseDisplayToLogical(), whereClauseGet(), whereClauseIsValid(), whereClauseLogicalToDisplay(), whereClauseLogicalToOdbc(), whereClauseNormalize(), whereClauseSet()
Methods
final method %CreateResultSet(Output tSC As %Status, pInfo As %ZEN.Auxiliary.QueryInfo, pExecute As %Boolean = 1) as %ResultSet
Internal method.
Create and execute the %ResultSet object used to supply data for this component. If pExecute is false, then do not execute the query.
Create and execute the %ResultSet object used to supply data for this component. If pExecute is false, then do not execute the query.
method %OnCreateResultSet(Output tSC As %Status, pInfo As %ZEN.Auxiliary.QueryInfo) as %ResultSet
Internal method.
Subclasses can override this to create the %ResultSet object used to used by this component.
The default implementation is to call the page method specified by the OnCreateResultSet property, if defined.
Subclasses can override this to create the %ResultSet object used to used by this component.
The default implementation is to call the page method specified by the OnCreateResultSet property, if defined.
method %OnExecuteResultSet(pRS As %ResultSet, Output tSC As %Status, pInfo As %ZEN.Auxiliary.QueryInfo) as %Boolean
Internal method.
Subclasses can override this to execute the %ResultSet object used to by this component.
Return true (1) if the result set has been executed.
The default implementation is to call the page method specified by the onExecuteResultSet property, if defined.
Subclasses can override this to execute the %ResultSet object used to by this component.
Return true (1) if the result set has been executed.
The default implementation is to call the page method specified by the onExecuteResultSet property, if defined.