This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.

For information on migrating to InterSystems IRIS, see Why Migrate to InterSystems IRIS?

%iKnow.Metrics.MetricQAPI

class %iKnow.Metrics.MetricQAPI extends %iKnow.Queries.AbstractQAPI

This is an automatically generated class, offering a functionally equivalent set of methods and queries as %iKnow.Metrics.MetricAPI, exposed as SqlProc methods.

See the classdocs for %iKnow.Metrics.MetricAPI for more information.

This class was generated by : %iKnow.Metrics.MetricAPI.cls

Method Inventory

Methods

classmethod GetMetricId(pDomainId As %Integer, pMetricName As %Integer, Output scText As %String = "") as %Library.Integer [ SQLProc = MetricQAPI_GetMetricId ]
Returns the ID corresponding to the supplied metric name for this domain.
classmethod GetValue(pDomainId As %Integer, pMetricId As %Integer, pTargetType As %String(MAXLEN=32767), pTargetId As %Integer, pContext As %String(MAXLEN=32767)="") as %Library.Numeric [ SQLProc = MetricQAPI_GetValue ]

Returns the value of a particular target element identified by pTargetId (for example, when pTargetType = $$$IKMTRENTITY, pTargetId is a unique entity ID).

pContext is only required when the metric is not of type $$$IKMTRTYPEDOMAIN and should be a source ID for $$$IKMTRTYPESOURCE or a metadata value for $$$IKMTRTYPEGROUP.

classmethod SetValue(pDomainId As %Integer, pMetricId As %Integer, pTargetType As %String(MAXLEN=32767), pTargetId As %Integer, pValue As %Integer, pContext As %String(MAXLEN=32767)="") as %Boolean [ SQLProc = MetricQAPI_SetValue ]

Sets the value of a particular target element identified by pTargetId (for example, when pTargetType = $$$IKMTRENTITY, pTargetId is a unique entity ID) to pValue.

pContext is only required when the metric is not of type $$$IKMTRTYPEDOMAIN and should be a source ID for $$$IKMTRTYPESOURCE or a metadata value for $$$IKMTRTYPEGROUP.

Queries

query GetMetrics(pDomainId As %Integer)
Selects metricId As %Integer, name As %String(MAXLEN=32767), description As %String(MAXLEN=32767), type As %String(MAXLEN=32767), definitionClass As %String(MAXLEN=32767), builderClass As %String(MAXLEN=32767), groupField As %String(MAXLEN=32767)
Returns all the metrics registered in this domain.
query GetTargets(pDomainId As %Integer, pMetricId As %Integer)
Selects targetType As %String(MAXLEN=32767)
Returns all the target types registered for a given metric.
query GetTop(pDomainId As %Integer, pMetricId As %Integer, pPage As %Integer = 1, pPageSize As %Integer = 10, pContext As %String(MAXLEN=32767)="", pTargetType As %String(MAXLEN=32767)="")
Selects targetId As %Integer, targetValue As %String(MAXLEN=32767), score As %Numeric, targetType As %String(MAXLEN=32767)

Returns the elements with the highest values for custom metric pMetricId, optionally restricted to the target type pTargetType.

pContext is ignored when the metric is type $$$IKMTRTYPEDOMAIN and should be a source ID for $$$IKMTRTYPESOURCE or a metadata value for $$$IKMTRTYPEGROUP. In the latter case, pContext is optional and the top entries for all metadata values will be returned if left blank.

Inherited Members

Inherited Methods

Feedback