Skip to content

BasesQueryQueue

Unofficial

The file-change queue that streams vault files into a obsidian#QueryController’s query and keeps the results in sync as files are created, modified, renamed, or deleted.

Import:

import type { BasesQueryQueue } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export interface BasesQueryQueue extends Component

Extends: Component

Constructor

new BasesQueryQueue()

Constructor.

To extract the constructor type, use ExtractConstructor<Component>.

Properties

PropertyTypeDescription
_childrenComponent[]Child Components attached to current component, will be unloaded on unloading parent component.
(Inherited from Component)
_eventsEventRef[]Events that are attached to the current component, will be detached on unloading parent component.
(Inherited from Component)
_loadedbooleanWhether the component and its children are loaded.
(Inherited from Component)
appAppThe app instance.
domQueryControllerThe owning query controller, to which scan progress and removed results are reported.
queueunknownThe inner cancellable batch queue that drives the scan, or null when the queue is stopped.

Methods

MethodReturnsDescription
addChild(component)TAdds a child component, loading it if this component is loaded.
(Inherited from Component)
load()voidLoad this component and its children.
(Inherited from Component)
onFileChanged(file)voidRe-queues a renamed file or a file whose metadata cache changed.
onFileDeleted(file)voidRemoves a deleted file from the queue and from the results.
onload()voidOverride this to load your component.
(Inherited from Component)
onNonMarkdownFileChanged(file)voidQueues a created or modified non-markdown file.
onunload()voidOverride this to unload your component
(Inherited from Component)
register(cb)voidRegisters a callback to be called when unloading.
(Inherited from Component)
registerDomEvent(el, type, callback, options?)voidRegisters a DOM event to be detached when unloading.
(Inherited from Component)
registerDomEvent(el, type, callback, options?)voidRegisters a DOM event to be detached when unloading
(Inherited from Component)
registerDomEvent(el, type, callback, options?)voidRegisters a DOM event to be detached when unloading
(Inherited from Component)
registerEvent(eventRef)voidRegisters an event to be detached when unloading.
(Inherited from Component)
registerInterval(id)numberRegisters an interval (from setInterval) to be cancelled when unloading. Use window.setInterval instead of setInterval to avoid TypeScript confusing between NodeJS vs Browser API
(Inherited from Component)
registerScopeEvent(keymapEventHandler)voidRegister a scope keymap event handler to be removed on unload.
(Inherited from Component)
removeChild(component)TRemoves a child component, unloading it.
(Inherited from Component)
start()unknownStarts a new scan, enqueuing every file in the vault.
stop()voidStops and cancels the current scan.
unload()voidOverride this to unload your component.
(Inherited from Component)

Links to this page: