node-sqlite3

How to make SQLite to work with Angular 4+, Electron and NodeJS

人盡茶涼 提交于 2019-12-21 02:46:27
问题 I'm trying to build one small desktop app using: Angular 4+ NodeJS Electron SQLite3 NodeJS will be used for scanning local user hdd and inserting specific files that are found into SQLite3 database. I checked dozens of documentation and suggestions. Most of them suggest to use NodeJS express framework and make layer between Angular 4+ -> Express -> SQLite3. I want to avoid using express framework because it is going to be desktop app and it is not needed at all. What I tried and what I did: I

SQLITE_RANGE: bind or column out of range for INSERT statement

送分小仙女□ 提交于 2019-12-13 02:49:57
问题 I want to insert rows into a SQLite3 table using the knex.raw method. Unfortunately I get a 'SQLITE_RANGE' error, which makes my test fail. I have verified the bindings passed to the raw query in the following fashion: They respect the order of the INSERT statement They respect the specified column types They respect the number of bindings requested in the raw query Beyond that I have looked online, but couldn't find a solution to my issue. Below are the details of the operation attempted:

How to make SQLite to work with Angular 4+, Electron and NodeJS

▼魔方 西西 提交于 2019-12-03 08:32:23
I'm trying to build one small desktop app using: Angular 4+ NodeJS Electron SQLite3 NodeJS will be used for scanning local user hdd and inserting specific files that are found into SQLite3 database. I checked dozens of documentation and suggestions. Most of them suggest to use NodeJS express framework and make layer between Angular 4+ -> Express -> SQLite3. I want to avoid using express framework because it is going to be desktop app and it is not needed at all. What I tried and what I did: I installed: "sqlite3": "^3.1.9", "node-pre-gyp": "^0.6.36", as dependencies in my project. Than I have

How does `db.serialize` work in `node-sqlite3`

别说谁变了你拦得住时间么 提交于 2019-11-29 06:07:41
问题 Recently I'm learning to use node and node-sqlite3 to manipulate sqlite3, here is a sample. var sqlite3 = require('sqlite3'); var db = new sqlite3.Database(':memory:'); db.serialize(function() { db.run("CREATE TABLE test(info TEXT)"); db.run("INSERT INTO test (info) VALUES ('info1')"); }) db.close(); The documentation said that db.serialized was used to ensure SQL lines were executed in order, but I was confused, why wouldn't they get executed in order without db.serialize , after all they