Skip to content

Data Source: Vault Data

You can query your vault data. These tables are automatically created when you install SQLSeal and are available from any SQLSeal codeblock globally. They update automatically on file changes.

Example Usage

Query below fetches last 10 modified files in your vault.

sqlseal
SELECT *
FROM files
ORDER BY modified_at DESC
LIMIT 10

Table Structure

files table

Files table consists of the following columns:

ColumnDescriptionIntroduced In
idFile Path
pathSame as id, file path
nameName of the file, without path and extension
created_atTime of creation (ISO 8601). You can use it to order files by their creation date. Before version 0.22.0 value was unixepoch * 1000 (JavaScript epoch)0.18.1
modified_atTime of last modification (ISO 8601). You can use it to odrer files by their modification. Before version 0.22.0 value was unixepoch * 1000 (JavaScript epoch)0.18.1
file_sizeSize of the file on disk (in bytes)0.18.1
All file propertiesAll file properties are also added to the table. All the special characters will be transformed to underscores _, so for example note type will be accessible as note_type

tags table

Tags table consists of the following columns:

ColumnDescriptionIntroduced In
tagFull tag, including # symbol. For example #todo
pathFull path of the file the tag belongs to0.24.1
fileId(deprecated) same like path. Name changed for compatibility with other tables. Will get removed in the future versions

tasks table

Tasks table consists of the following columns:

ColumnDescriptionIntroduced In
taskContent of the task (text)
completed0 if not completed, 1 if completed
pathFull path of the file the tag belongs to0.24.1
filePath(deprecated) same like path. Name changed for compatibility with other tables. Will get removed in the future versions

Table containing all the links between files.

Introduced in 0.20.0

ColumnDescription
pathFull path of the source of the link
targetFull path of the target of the link
positionJSON object containing information about location of the link
display_textText displayed on the page for that link
target_existsinformation if the target file exists. 1 if it exists, 0 otherwise