Hierarchy

  • Filter

Constructors

Properties

cache: {
    [key: string]: Promise<number[]>;
}

Type declaration

  • [key: string]: Promise<number[]>
extent: undefined | Extent
sql: {
    [key: string]: string;
}

Type declaration

  • [key: string]: string

Methods

  • Returns list of cache keys that have caches

    Method

    cacheActiveKeys

    Returns string[]

    list of cache keys with active caches

  • Resets all internal caches related to a filter.

    Method

    clearCacheSet

    Parameters

    • filterName: string

      filter that has changed and needs its caches wiped

    Returns void

  • Returns cache for a specific filtering scenario.

    Method

    getCache

    Parameters

    • sqlFilters: string[]

      list of filter keys influencing this cache

    • includeExtent: boolean

      if the cache includes extent based filters

    Returns Promise<number[]>

    resolves in a filter result appropriate for the parameters. returns undefined if no cache exists.

  • Private

    Returns cache key depending on the situation we are in.

    Method

    getCacheKey

    Parameters

    • sqlFilters: string[]

      list of filter keys influencing this cache

    • includeExtent: boolean

      if the cache includes extent based filters

    Returns string

    the cache key to use

  • Returns a SQL WHERE condition that is combination of active filters.

    Method

    getCombinedSql

    Parameters

    • Optional exclusions: string[] = []

      list of any filter keys to exclude from the result. omission includes all filters

    Returns string

    all non-excluded sql statements connected with AND operators.

  • Returns current SQL for a filter key

    Method

    getSql

    Parameters

    • filterKey: string

      key string indicating what filter the sql belongs to

    Returns string

    the SQL, if any, that matches the filter type

  • Indicates if any filters are active. A Permanent filter does not influence the result.

    Method

    isActive

    Returns boolean

    indicates if any non-permanent filters are active

  • Sets a filter query in a cache, so repeated identical requests will only hit the server once

    Method

    setCache

    Parameters

    • queryPromise: Promise<number[]>

      the query we want to cache

    • sqlFilters: string[]

      list of filter keys influencing this cache

    • includeExtent: boolean

      if the cache includes extent based filters

    Returns void

  • Registers a new extent for cache tracking.

    Method

    setExtent

    Parameters

    • extent: Extent

      the extent to filter against

    Returns void

  • Updates a SQL filter clause.

    Method

    setSql

    Parameters

    • filterKey: string

      key of the filter to update (can be a new value)

    • whereClause: string

      clause defining the active filters on symbols. Use '' for no filter. Use '1=2' for everything filtered.

    Returns void

  • Returns list of filter keys that have active filters

    Method

    sqlActiveFilters

    Parameters

    • Optional exclusions: string[] = []

      list of any filter keys to exclude from the result. omission includes all filters

    Returns string[]

    list of filter keys with active filter sql

Generated using TypeDoc