SiYuan icon

SiYuan

Manage SiYuan notebooks, documents, blocks, attributes, and more. Designed for AI agent workflows.

Search → SQL Query

AI-generated

Summary

Runs the supplied SQL statement against the SiYuan database using its SQL query API. Use it to retrieve rows with custom SQL, such as filtering or limiting results; the operation does not modify data unless the statement itself does so.

Inputs

  • SQL Statement (required) — SQL to run against the SiYuan database. Defaults to SELECT * FROM blocks LIMIT 10. SiYuan uses SQLite.

Output shape

A list of rows returned by the query.

The rows are passed through from the SiYuan API without reshaping. The number and fields depend on the SQL statement. API or SQL errors are raised; with Continue On Fail enabled, the node returns an error object instead.

Links

Discussion