SQLite Node (Better) icon

SQLite Node (Better)

A node to perform query in a local sqlite database

SQLite Node (Better)

AI-generated

Summary

Execute SQL queries on a local SQLite database file specified by path, supporting various query types like CREATE, SELECT, INSERT, UPDATE, and DELETE, with flexible variable binding and configurable output format.

Inputs

  • Database Path (required) — The filesystem path to the SQLite database file to query.
  • Query Type (required) — The type of SQL query to execute; can be AUTO to detect type automatically or one of CREATE, DELETE, INSERT, SELECT, UPDATE.
  • Query (required) — The SQL statement(s) to be executed against the database, supporting multiple SELECT queries separated by semicolons if Query Type is SELECT.
  • Variables — Variables to bind to SQL query parameters via a user-friendly form interface; variable names exclude prefix characters (@ or $).
  • Args (JSON) — Additional JSON-formatted key-value pairs to bind as variables to the query; merged with form variables.
  • Array Field Name — If set for SELECT or AUTO queries, returns all results as a single item with one field containing an array of rows named accordingly; if empty, returns each row as an individual item.
  • Additional Options — Advanced settings to specify use of default or custom better-sqlite3 bindings for non-Docker execution environments.

Output shape

A list of JSON items representing query results or status. For SELECT queries, returns rows as individual items or a single item containing all rows in an array field if Array Field Name is set. For INSERT, UPDATE, DELETE, returns an object with changes count and last inserted row ID. For CREATE and other queries, returns a message indicating success.

If multiple SELECT queries are given separated by semicolons, results for each query are returned as arrays. Errors throw exceptions unless 'continue on fail' is enabled, in which case errors return as error objects within the output items.

Discussion