Actions71
- Asset Actions
- Attribute Actions
- Block Actions
- Database Actions
- Document Actions
- Markdown Table Actions
- Notebook Actions
- Search Actions
- System Actions
- Tag Actions
Search → SQL Query
AI-generatedOverview
This node executes a SQL query on the SiYuan database, allowing users to retrieve data by running custom SQL statements. It is useful for scenarios where users need to perform complex searches or data extraction from the SiYuan workspace using SQL syntax. For example, users can query blocks containing specific keywords or limit the number of results returned.
Use Case Examples
- SELECT * FROM blocks WHERE content LIKE '%keyword%'
- SELECT * FROM blocks LIMIT 10
Properties
| Name | Meaning |
|---|---|
| SQL Statement | A SQL query to run on the SiYuan database, such as selecting data from blocks with specific conditions. |
Output
JSON
result- The result set returned from the SQL query executed on the SiYuan database.
Dependencies
- Requires SiYuan API URL and API Token credentials for authentication.
Troubleshooting
- Ensure that the SiYuan API URL and Token are correctly set in the node credentials; missing or incorrect credentials will cause an error.
- If the SQL query syntax is invalid or the query references non-existent tables or columns, the node will throw an error. Verify the SQL statement for correctness.
- Unsupported resource or operation errors occur if the resource or operation parameters are incorrect; ensure 'Search' resource and 'SQL Query' operation are selected.