vaultmd / QueryApi
Type Alias: QueryApi
QueryApi =
object
Defined in: src/query/models/query-api.ts:14
The read-only query surface over the derived SQLite index, exposed as vault.query. Results are always filtered to notes the vault instance is allowed to read.
Methods
backlinks()
backlinks(
path,opts?):Backlink[]
Defined in: src/query/models/query-api.ts:32
Notes that link to path via [[wikilink]] or relative-link resolution. Defaults to limit 100; hard cap 1000.
Parameters
path
string
opts?
limit?
number
offset?
number
Returns
Backlink[]
outboundLinks()
outboundLinks(
path,opts?):OutboundLink[]
Defined in: src/query/models/query-api.ts:40
Links out of path, each with its resolved target (or null if the link dangles). Defaults to limit 100; hard cap 1000.
Parameters
path
string
opts?
limit?
number
offset?
number
Returns
queryNotes()
queryNotes(
opts?):NoteHit[]
Defined in: src/query/models/query-api.ts:20
Filter notes by tag, frontmatter field, and/or folder, with ordering and pagination. Defaults to newest-first (mtime_ms desc), limit 100; hard cap 1000.
Parameters
opts?
folder?
string
limit?
number
offset?
number
orderBy?
tag?
string
where?
Returns
NoteHit[]
searchText()
searchText(
q,opts?):SearchHit[]
Defined in: src/query/models/query-api.ts:48
FTS5 keyword search over note bodies, returning highlighted snippets. Defaults to limit 100; hard cap 1000.
Parameters
q
string
opts?
folder?
string
limit?
number
offset?
number
tag?
string
Returns
tags()
tags(
opts?):TagInfo[]
Defined in: src/query/models/query-api.ts:59
Every tag present on notes the instance can read, each with the number of those notes that carry it, ranked most-used first (canonical tags float to the top). prefix matches case-sensitively for hierarchy navigation; contains is a substring search (ASCII case-insensitive, per SQLite LIKE); folder restricts to a folder subtree; limit caps the result.
Parameters
opts?
contains?
string
folder?
string
limit?
number
prefix?
string
Returns
TagInfo[]