IRISLIB database
Utils Class Reference
Inheritance diagram for Utils:
Collaboration diagram for Utils:

Static Public Member Functions

_.Library.Status DumpQueryResult (_.Library.String pFilename, _.Library.String pQueryClass, _.Library.String pQueryName, pQueryParams)
 
_.Library.String GetParameterDisplayName (_.Library.String paramName)
 
_.Library.Boolean GetParameterValues (_.Library.String paramName, values, _.Library.String queryClass, _.Library.String queryName)
 
_.Library.Status GetQueryResultColumns (_.Library.String queryClass, _.Library.String queryName, columns)
 

Additional Inherited Members

- Public Member Functions inherited from RegisteredObject
_.Library.Status OnAddToSaveSet (_.Library.Integer depth, _.Library.Integer insert, _.Library.Integer callcount)
 This callback method is invoked when the current object is added to the SaveSet,. More...
 
_.Library.Status OnClose ()
 This callback method is invoked by the <METHOD>Close</METHOD> method to. More...
 
_.Library.Status OnConstructClone (_.Library.RegisteredObject object, _.Library.Boolean deep, _.Library.String cloned)
 This callback method is invoked by the <METHOD>ConstructClone</METHOD> method to. More...
 
_.Library.Status OnNew ()
 This callback method is invoked by the <METHOD>New</METHOD> method to. More...
 
_.Library.Status OnValidateObject ()
 This callback method is invoked by the <METHOD>ValidateObject</METHOD> method to. More...
 
- Static Public Attributes inherited from RegisteredObject
 CAPTION = None
 Optional name used by the Form Wizard for a class when generating forms. More...
 
 JAVATYPE = None
 The Java type to be used when exported.
 
 PROPERTYVALIDATION = None
 This parameter controls the default validation behavior for the object. More...
 

Detailed Description

Utility class grouping some utility and informative methods complementing the iKnow Query APIs.

Member Function Documentation

◆ DumpQueryResult()

_.Library.Status DumpQueryResult ( _.Library.String  pFilename,
_.Library.String  pQueryClass,
_.Library.String  pQueryName,
  pQueryParams 
)
static

Utility class grouping some utility and informative methods complementing the iKnow Query APIs.

This utility method executes a query of one of the primary iKnow query APIs (with the *API suffix),

as identified by pQueryClass and pQueryName, and writes the output as a CSV file to pFilename. This will overwrite the output file if it already exists and the output will include a header line containing column names and types.

pQueryParams... is to contain all the parameters you would normally supply to the query, except for its ByRef result parameter, which is taken care of by this utility.

For example, a query defined as

User.MyAPI.GetXByY(ByRef result, domainId As Integer, x As String,
     y As String)

will be called as follows:

do ##class(iKnow.Queries.Utils).DumpQueryResult("C:\temp\myFile.csv", 
     "User.MyAPI", "GetXByY", domainId, x, y)

◆ GetParameterDisplayName()

_.Library.String GetParameterDisplayName ( _.Library.String  paramName)
static

Returns a displayable name for most query parameter names in use. If no more readable

form is available (for example if it's too trivial), paramName itself is returned.

◆ GetParameterValues()

_.Library.Boolean GetParameterValues ( _.Library.String  paramName,
  values,
_.Library.String  queryClass,
_.Library.String  queryName 
)
static

Returns a list of the possible parameter values for a number of common query parameters in a

variable containing key-displayValue pairs: values(i) = $lb(key, value). The Boolean returned expresses whether this is a known parameter for which a meaningful list of values can be returned.

The optional queryClass and queryName parameters will in some cases limit the possible values to the allowed ones supported by that particular query.

Note: for the "pageSize" parameter, this method will return a limited number of possible values to make this method more useful for internal purposes, but obviously any positive numeric value will do.

◆ GetQueryResultColumns()

_.Library.Status GetQueryResultColumns ( _.Library.String  queryClass,
_.Library.String  queryName,
  columns 
)
static

Returns a list of the columns returned by the query identified by the queryClass and

queryName parameters in the following format: columns(index) = $lb(name,type). If the supplied parameters do not correspond to a known query, an error is returned.