IRISLIB database
querySource Class Reference

This abstract class provides a standard interface for creating a <class>ResultSet</class> object that a component can then use to supply itself with data. More...

Inheritance diagram for querySource:

Public Attributes

 OnCreateResultSet
 (optional) Name of Server-side callback method to call to create More...
 
 OnExecuteResultSet
 (optional) Name of Server-side callback method to call to execute the More...
 
 columnName
 (optional) Name of a column in the SQL table used to provide data. More...
 
 countRows
 This property should not be used; it is provided for backward compatibility. More...
 
 groupByClause
 (optional) An SQL GROUP BY clause: e.g., "Year,State"
More...
 
 maxRows
 Maximum number of rows to fetch from the <class>ResultSet</class> object. More...
 
 orderByClause
 (optional) An SQL ORDER BY clause: e.g., "Name,State"
More...
 
 queryClass
 (optional) Name of the class containing the class query that will More...
 
 queryName
 (optional) Name of the class query that will More...
 
 sql
 (optional) SQL statement that, if present, will be used to More...
 
 tableName
 (optional) Name of an SQL table used to provide data. More...
 
 whereClause
 (optional) An SQL WHERE clause: e.g., "Name='Elvis'"
More...
 

Private Member Functions

_.Library.ResultSet CreateResultSet (_.Library.Status tSC, _.ZEN.Auxiliary.QueryInfo pInfo, _.Library.Boolean pExecute)
 Internal method. More...
 
_.Library.ResultSet OnCreateResultSet (_.Library.Status tSC, _.ZEN.Auxiliary.QueryInfo pInfo)
 Internal method. More...
 
_.Library.Boolean OnExecuteResultSet (_.Library.ResultSet pRS, _.Library.Status tSC, _.ZEN.Auxiliary.QueryInfo pInfo)
 Internal method. More...
 

Detailed Description

This abstract class provides a standard interface for creating a <class>ResultSet</class> object that a component can then use to supply itself with data.


There are several ways to define the creation of a <class>ResultSet</class> object:

  • Define an SQL statement using the <property>sql</property> property.
  • Provide the class and name of a class query using the <property>queryClass</property> and <property>queryName</property> properties.
  • Define a callback method using the <property>OnCreateResultSet</property> property.

Member Function Documentation

◆ CreateResultSet()

_.Library.ResultSet CreateResultSet ( _.Library.Status  tSC,
_.ZEN.Auxiliary.QueryInfo  pInfo,
_.Library.Boolean  pExecute 
)
private

Internal method.


Create and execute the <class>ResultSet</class> object used to supply data for this component. If pExecute is false, then do not execute the query.

◆ OnCreateResultSet()

_.Library.ResultSet OnCreateResultSet ( _.Library.Status  tSC,
_.ZEN.Auxiliary.QueryInfo  pInfo 
)
private

Internal method.


Subclasses can override this to create the <class>ResultSet</class> object used to used by this component.
The default implementation is to call the page method specified by the <property>OnCreateResultSet</property> property, if defined.

◆ OnExecuteResultSet()

_.Library.Boolean OnExecuteResultSet ( _.Library.ResultSet  pRS,
_.Library.Status  tSC,
_.ZEN.Auxiliary.QueryInfo  pInfo 
)
private

Internal method.


Subclasses can override this to execute the <class>ResultSet</class> 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 <property>onExecuteResultSet</property> property, if defined.

Member Data Documentation

◆ OnCreateResultSet

OnCreateResultSet

(optional) Name of Server-side callback method to call to create

a <class>ResultSet</class> object.
This must be the name of a server-only method in the page class that contains this component.  

◆ OnExecuteResultSet

OnExecuteResultSet

(optional) Name of Server-side callback method to call to execute the

<class>ResultSet</class> object.
This must be the name of a server-only method in the page class that contains this table pane.  

◆ columnName

columnName

(optional) Name of a column in the SQL table used to provide data.


If both this and <property>tableName</property> 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 <property>columnName</property> for the display value.
This must contain a valid column name.
 

◆ countRows

countRows

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).

 

◆ groupByClause

groupByClause

(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.  

◆ maxRows

maxRows

Maximum number of rows to fetch from the <class>ResultSet</class> 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.  

◆ orderByClause

orderByClause

(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.  

◆ queryClass

queryClass

(optional) Name of the class containing the class query that will

be used to create a <class>ResultSet</class> object.
This is an encrypted value and cannot be modified on the client.  

◆ queryName

queryName

(optional) Name of the class query that will

be used to create a <class>ResultSet</class> object.  

◆ sql

sql

(optional) SQL statement that, if present, will be used to

create a <class>ResultSet</class> object.
If defined, this takes precedence over <property>queryClass</property> and <property>queryName</property>.  

◆ tableName

tableName

(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.  

◆ whereClause

whereClause

(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.