From 8fb1169fa0138bee2f87a1efddc60f1d70a07b04 Mon Sep 17 00:00:00 2001 From: unborn-andy <93290787+unborn-andy@users.noreply.github.com> Date: Tue, 4 Jan 2022 22:37:19 +0200 Subject: [PATCH] Update sqlite.html --- storage/sqlite/locales/en-US/sqlite.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/storage/sqlite/locales/en-US/sqlite.html b/storage/sqlite/locales/en-US/sqlite.html index 7aedae62..0a8e69b2 100644 --- a/storage/sqlite/locales/en-US/sqlite.html +++ b/storage/sqlite/locales/en-US/sqlite.html @@ -6,6 +6,10 @@

SQL Type Prepared Statement also uses db.all but sanitizes parameters passed, eliminating the possibility of SQL injection.

SQL Type Batch without response uses db.exec which runs all SQL statements in the provided string. No result rows are returned.

When using Via msg.topic or Batch without response msg.topic must hold the query for the database.

+

When using Via msg.topic, parameters can be passed in the query using a msg.payload array. Ex:
+ msg.topic = `INSERT INTO test (name, surname) VALUES ($name, $surname)`
+ msg.payload = ["John", "Smith"]
+ return msg;

When using Normal or Prepared Statement, the query must be entered in the node config.

Pass in the parameters as an object in msg.params for Prepared Statement. Ex:
msg.params = {