[{"data":1,"prerenderedAt":76},["ShallowReactive",2],{"integration-node-red-node-sqlite\u002F":3},{"_id":4,"categories":5,"author":9,"description":13,"npmOwners":14,"npmScope":17,"name":4,"ffCertified":18,"downloads":19,"version":21,"updatedAt":22,"tier":23,"maintainers":24,"homepage":28,"bugs":29,"repository":31,"time":35,"lastUpdated":22,"created":36,"license":71,"githubOwner":72,"githubRepo":73,"examples":74,"readme":75},"node-red-node-sqlite",[6,7,8],"catalogue_database","catalogue_storage","catalogue",{"name":10,"email":11,"url":12},"Dave Conway-Jones","dceejay@gmail.com","http:\u002F\u002Fnodered.org","A sqlite node for Node-RED",[15,16],"knolleary","dceejay",null,true,{"week":20},2625,"2.0.1","2026-04-17T09:44:40.743Z","recommended",[25,27],{"name":15,"email":26},"nick.oleary@gmail.com",{"name":16,"email":11},"https:\u002F\u002Fgithub.com\u002Fnode-red\u002Fnode-red-nodes#readme",{"url":30},"https:\u002F\u002Fgithub.com\u002Fnode-red\u002Fnode-red-nodes\u002Fissues",{"type":32,"url":33,"directory":34},"git","git+https:\u002F\u002Fgithub.com\u002Fnode-red\u002Fnode-red-nodes.git","tree\u002Fmaster\u002Fstorage\u002Fsqlite",{"created":36,"modified":22,"0.0.1":36,"0.0.2":37,"0.0.3":38,"0.0.4":39,"0.0.5":40,"0.0.7":41,"0.1.0":42,"0.1.1":43,"0.1.2":44,"0.2.0":45,"0.2.1":46,"0.2.2":47,"0.2.3":48,"0.3.0":49,"0.3.2":50,"0.3.3":51,"0.3.4":52,"0.3.5":53,"0.3.6":54,"0.3.7":55,"0.4.0":56,"0.4.1":57,"0.4.2":58,"0.4.3":59,"0.4.4":60,"0.5.0":61,"0.6.0":62,"1.0.0":63,"1.0.1":64,"1.0.2":65,"1.0.3":66,"1.1.0":67,"1.1.1":68,"2.0.0":69,"2.0.1":70},"2014-07-27T14:26:47.981Z","2014-07-27T14:37:11.165Z","2014-09-22T19:47:03.436Z","2015-01-26T10:58:52.353Z","2015-03-18T08:45:05.134Z","2015-05-29T13:59:00.067Z","2016-01-04T09:09:42.715Z","2016-03-02T13:32:33.547Z","2016-11-06T20:34:48.541Z","2018-03-20T19:08:48.814Z","2018-03-29T08:33:02.596Z","2018-05-18T17:40:41.656Z","2018-05-30T10:17:27.782Z","2018-07-19T11:37:26.268Z","2018-08-11T13:03:30.754Z","2018-08-21T21:54:39.356Z","2018-08-22T22:46:23.678Z","2018-08-24T14:23:49.799Z","2018-12-19T19:37:47.530Z","2019-04-25T11:40:55.495Z","2019-10-12T09:26:19.043Z","2019-11-13T13:31:49.324Z","2020-02-23T11:27:11.774Z","2020-04-03T21:26:52.342Z","2020-09-09T13:26:13.868Z","2020-12-17T08:29:06.650Z","2021-03-13T14:16:13.341Z","2021-08-17T09:35:09.978Z","2021-09-13T10:10:12.830Z","2022-01-05T11:43:50.480Z","2022-01-05T16:23:09.322Z","2023-09-16T18:17:02.477Z","2025-09-11T21:10:05.842Z","2026-04-07T11:17:16.363Z","2026-04-17T09:44:40.635Z","Apache-2.0","node-red","node-red-nodes",[],"\u003Ch1 id=\"node-red-node-sqlite\">\u003Ca class=\"header-anchor\" href=\"#node-red-node-sqlite\">node-red-node-sqlite\u003C\u002Fa>\u003C\u002Fh1>\n\u003Cp>A Node-Red node to read and write a local sqlite database.\u003C\u002Fp>\n\u003Ch2 id=\"install\">\u003Ca class=\"header-anchor\" href=\"#install\">Install\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Run the following command in your Node-RED user directory - typically \u003Ccode>~\u002F.node-red\u003C\u002Fcode>\u003C\u002Fp>\n\u003Cpre>\u003Ccode>npm i --unsafe-perm node-red-node-sqlite\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>\u003Cstrong>Breaking - v2.x\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cp>Version 2 updates the underlying library and this may not have all the required precompiled binaries for all platforms. If you get an error loading the node - for example saying \u003Cem>GLIBC_2.38 not found\u003C\u002Fem> - then you will need to rebuild the sqlite3 binary locally. This can be done by running the rebuild command in the correct directory. This will be something like\u003C\u002Fp>\n\u003Cpre>\u003Ccode>cd ~\u002F.node-red\u002Fnode_modules\u002Fsqlite3\nnpm run rebuild\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>but of course if you have installed under a project or under docker it may be in a different location.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Notes\u003C\u002Fstrong>:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\n\u003Cp>Version 1.x requires nodejs v12 or greater.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>The install process requires a compile of native code. This can take 15-20 minutes on devices like a Raspberry Pi - please be prepared to wait a long time. Also if node.js is upgraded at any point you will need to rebuild the native part manually, for example.\u003C\u002Fp>\n\u003Cp>cd ~\u002F.node-red\nnpm rebuild\u003C\u002Fp>\n\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"usage\">\u003Ca class=\"header-anchor\" href=\"#usage\">Usage\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Allows access to a SQLite database.\u003C\u002Fp>\n\u003Cp>SQL Query sets how the query is passed to the node.\u003C\u002Fp>\n\u003Cp>SQL Query Via msg.topic and Fixed Statement uses the db.all operation against the configured database.\nThis does allow INSERTS, UPDATES and DELETES. By its very nature it is SQL injection... so be careful out there...\u003C\u002Fp>\n\u003Cp>SQL Type Prepared Statement also uses db.all but sanitizes parameters passed, eliminating the possibility of SQL injection.\u003C\u002Fp>\n\u003Cp>SQL Type Batch without response uses db.exec which runs all SQL statements in the provided string. No result rows are returned.\u003C\u002Fp>\n\u003Cp>When using Via msg.topic or Batch without response msg.topic must hold the query for the database.\u003C\u002Fp>\n\u003Cp>When using Via msg.topic, parameters can be passed in the query using a msg.payload array. Ex:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>msg.topic = `INSERT INTO user_table (name, surname) VALUES ($name, $surname)`\nmsg.payload = [\"John\", \"Smith\"]\nreturn msg;\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>When using Normal or Prepared Statement, the query must be entered in the node config.\u003C\u002Fp>\n\u003Cp>Pass in the parameters as an object in msg.params for Prepared Statement. Ex:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>msg.params = {\n    $id:1,\n    $name:\"John Doe\"\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Parameter object names must match parameters set up in the Prepared Statement. If you get the error SQLITE_RANGE: bind or column index out of range be sure to include $ on the parameter object key.\nThe SQL query for the example above could be: insert into user_table (user_id, user) VALUES ($id, $name);\u003C\u002Fp>\n\u003Cp>Using any SQL Query, the result is returned in msg.payload\u003C\u002Fp>\n\u003Cp>Typically the returned payload will be an array of the result rows, (or an error).\u003C\u002Fp>\n\u003Cp>You can load SQLite extensions by inputting a msg.extension property containing the full path and filename.\u003C\u002Fp>\n\u003Cp>The reconnect timeout in milliseconds can be changed by adding a line to \u003Ccode>settings.js\u003C\u002Fcode>\u003C\u002Fp>\n\u003Cp>\u003Ccode>sqliteReconnectTime: 20000,\u003C\u002Fcode>\u003C\u002Fp>\n",1784738654066]