Class Reference
IRIS for UNIX 2019.2
InterSystems: The power behind what matters   
Documentation  Search
  [%SYS] >  [%iKnow] >  [Filters] >  [SqlFilter]
Private  Storage   

class %iKnow.Filters.SqlFilter extends %iKnow.Filters.Filter

Sample filter implementation restricting sources based on a SQL query result. This SQL query can select from any regular SQL table or view accessible from the namespace the filter is instantiated from. The query should select sources through returning either of the following as result columns (case sensitive!):

Filter parameters:

  1. domainId As %Integer
  2. sqlQuery As %String - query to filter by

WARNING: these filters are not invalidated automatically if the values in the tables accessed by the supplied SQL query change. It is up to the user to decide, based on the specifics of the environment, whether filter instances of this class can be cached meaningfully (see the useCache parameter of Initialize) and/or should be invalidated explicitly (see Invalidate or ClearCachedFilter).

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
3 4


Summary

Properties
DomainId FilteredSourceCount IsCached Selectivity
SqlQuery

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName
%ConstructClone %DispatchClassMethod %DispatchGetModified
%DispatchGetProperty %DispatchMethod %DispatchSetModified
%DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified
%New %NormalizeObject %ObjectModified
%OriginalNamespace %PackageName %RemoveFromSaveSet
%SerializeObject %SetModified %ValidateObject
CheckResultCache CheckResultCacheSingle ClearCachedFilter
ClearCachedFilters CreateAsString CreateFromBitstring
CreateGroupAsString FromString GetCRCOccurrenceFilter
GetCRCUniqueFilter GetCcUniqueFilter GetEntityOccurrenceFilter
GetEntityUniqueFilter GetFilteredCcFrequency GetFilteredCcSpread
GetFilteredCrcFrequency GetFilteredCrcSpread GetFilteredEntityFrequency
GetFilteredEntitySpread GetFilteredEntityUniqueCount GetFilteredStemFrequency
GetFilteredStemSpread GetFirstFilteredSource GetLabel
GetNextCRCOccurrenceFilterOffset GetNextCRCUniqueFilterOffset GetNextCcUniqueFilterOffset
GetNextEntityOccurrenceFilterOffset GetNextEntityUniqueFilterOffset GetNextPathFilterOffset
GetNextSourceFilterOffset GetNextSrcId GetPathFilter
GetSourceFilter Initialize Invalidate
IsFiltered IsValid RestoreFilterFromId
RestoreFilterFromString StoreResultCache StoreResultCacheSingle
ToString


Properties

• property SqlQuery as %String;

Methods

• method ToString() as %String

Subclasses should implement this method to build a string representation of the filter instance. It should start with the filter class name, followed by a pipe (|) character and then a string representation that can be interpreted by its RestoreFilterFromStringInternal implementation.



Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.