Interface nsINavHistoryQueryType

This object encapsulates all the query parameters you're likely to need when building up history UI. All parameters are ANDed together.

This is not intended to be a super-general query mechanism. This was designed so that most queries can be done in only one SQL query. This is important because, if the user has their profile on a networked drive, query latency can be non-negligible.

Hierarchy

Properties

absoluteBeginTime: number
absoluteEndTime: number
annotation: string
annotationIsNot: boolean

Test for existence or non-existence of a given annotation. We don't currently support >1 annotation name per query. If 'annotationIsNot' is true, we test for the non-existence of the specified annotation.

Testing for not annotation will do the same thing as a normal query and remove everything that doesn't have that annotation. Asking for things that DO have a given annotation is a little different. It also includes things that have never been visited. This allows place queries to be returned as well as anything else that may have been tagged with an annotation. This will only work for RESULTS_AS_URI since there will be no visits for these items.

beginTime: number
beginTimeReference: number
domain: string

This is the host or domain name (controlled by domainIsHost). When domainIsHost, domain only does exact matching on host names. Otherwise, it will return anything whose host name ends in 'domain'.

This one is a little different than most. Setting it to an empty string is a real query and will match any URI that has no host name (local files and such). Set this to NULL (in C++ use SetIsVoid) if you don't want domain matching.

domainIsHost: boolean

This controls the meaning of 'domain', and whether it is an exact match 'domainIsHost' = true, or hierarchical (= false).

endTime: number
endTimeReference: number
hasAnnotation: boolean
hasBeginTime: boolean
hasDomain: boolean
hasEndTime: boolean
hasSearchTerms: boolean
hasUri: boolean
maxVisits: number
minVisits: number

Set lower or upper limits for how many times an item has been visited. The default is -1, and in that case all items are matched regardless of their visit count.

onlyBookmarked: boolean

When set, returns only bookmarked items, when unset, returns anything. Setting this is equivalent to listing all bookmark folders in the 'folders' parameter.

parentCount: number
searchTerms: string

Text search terms.

tags: nsIVariant

Limit results to items that are tagged with all of the given tags. This attribute must be set to an array of strings. When called as a getter it will return an array of strings sorted ascending in lexicographical order. The array may be empty in either case. Duplicate tags may be specified when setting the attribute, but the getter returns only unique tags.

tagsAreNot: boolean

If 'tagsAreNot' is true, the results are instead limited to items that are not tagged with any of the given tags. This attribute is used in conjunction with the 'tags' attribute.

transitionCount: number

Get the count of the set query transitions.

uri: nsIURI

This is a URI to match, to, for example, find out every time you visited a given URI. This is an exact match.

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Creates a new query item with the same parameters of this one.

    Returns nsINavHistoryQuery

  • This is not recursive so results will be returned from the first level of that folder.

    Parameters

    • aGuids: invalid

    Returns void

  • When the set of transitions is nonempty, results are limited to pages which have at least one visit for each of the transition types. @note: For searching on more than one transition this can be very slow.

    Limit results to the specified list of transition types.

    Parameters

    • transitions: invalid

    Returns void

Generated using TypeDoc