Home > Class Reference > ENSLIB namespace > %ZEN.Auxiliary.QueryInfo
Private  

%ZEN.Auxiliary.QueryInfo

class %ZEN.Auxiliary.QueryInfo extends %RegisteredObject

This is a server-class used to pass information specifying how to build a result set object.
This is used by classes that inherit from the querySource class. Some of these properties are only relevant for tables.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
17 3

Summary

Properties
columnExpression columnName columns filterOps
filterTypes filters groupByClause orderByClause
parms queryExecuted queryText rowCount
rows sortColumn sortOrder tableName
whereClause
Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%CreateSQL %DispatchClassMethod %DispatchGetModified %DispatchGetProperty
%DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty
%Extends %GetParameter %IsA %IsModified
%IsValidSQLName %New %NormalizeObject %ObjectModified
%OriginalNamespace %PackageName %RemoveFromSaveSet %SerializeObject
%SetModified %ValidateObject QuoteSQL

Properties

property columnExpression as %ZEN.Datatype.string [ MultiDimensional ];
Optional SQL expression to use for a column, subcripted by column name:
..columnExpression(colname) = expr
This will be provided for tables that use *auto sql* mode.
property columnName as %ZEN.Datatype.string;
Name of column used to provide data. This is used for tables that are auto-generated when no other column information is available.
property columns as %ZEN.Datatype.string [ MultiDimensional ];
Names of columns within the query, subcripted by column number:
..columns(n) = colName
This will be provided for tables that use *auto sql* mode.
property filterOps as %ZEN.Datatype.string [ MultiDimensional ];
Set of column filter operations subscripted by column name:
..filterOps(colName) = op
Where op is an SQL operation: %STARTSWITH, =, etc.
property filterTypes as %ZEN.Datatype.string [ MultiDimensional ];
Set of column filter types subscripted by column name:
..filterTypes(colName) = type
property filters as %ZEN.Datatype.string [ MultiDimensional ];
Set of column filter values subscripted by column name:
..filters(colName) = filterValue
property groupByClause as %ZEN.Datatype.string;
Optional GROUP BY clause for tables in *auto sql* mode.
property orderByClause as %ZEN.Datatype.string;
Optional ORDER BY clause for tables in *auto sql* mode.
property parms as %ZEN.Datatype.string [ MultiDimensional ];
Set of query parameter values subscripted by parameter number:
..parms(n) = value
property queryExecuted as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
Output property.
Set this property to true in OnCreateResultSet method to indicate that the newly created ResultSet has already been executed.
property queryText as %ZEN.Datatype.string;
Output property.
This is also used for the output of the %CreateQuery method.
When a query is executed, the text of the query (either sql or query name) is placed here (for diagnostic purposes).
property rowCount as %ZEN.Datatype.string;
Output property.
Query will place number of rows in query here if it wants to report this value to the client.
property rows as %ZEN.Datatype.integer;
The number of rows that the component will display. For a "snapshot" query this will be the size of the snapshot.
property sortColumn as %ZEN.Datatype.string;
Optional name of column to sort results by. If the table is in *auto sql* mode, then this is used as the first part of the generated ORDER BY clause.
property sortOrder as %ZEN.Datatype.string(VALUELIST=",asc,desc");
Specifies direction of sorting, if any. This applies to the column specified by sortColumn.
property tableName as %ZEN.Datatype.string;
Name of table used to provide data. This will be provided for tables that use *auto sql* mode.
property whereClause as %ZEN.Datatype.string;
Optional WHERE clause for tables in *auto sql* mode.

Methods

method %CreateSQL(pComputeRowCount As %Boolean = 1, pInfo As %ZEN.Auxiliary.QueryInfo) as %Status
Utility method: construct a (very simple) SQL statement based on the specifications contains within this object's properties. The resulting query is placed within the queryText property.
classmethod %IsValidSQLName(pName As %String) as %Boolean
Test if pName is a valid SQL name.
classmethod QuoteSQL(pVal As %String, pType As %String = "")
Take a value and return an SQL literal (with quotes and escaped quotes as needed).
pType is the "filter" type: if "date" quote as ODBC literal.