Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sqlite-express

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sqlite-express - npm Package Compare versions

Comparing version 2.0.10 to 2.0.11

7

modules/select.js

@@ -1,13 +0,10 @@

const signs = require('./submodules/signos');
const is = require('./submodules/is');
const whereConstructor = require('./submodules/where');
const procecedRows = require('./submodules/procecedRows');
module.exports = async (db, table, col, where, conect) => {
return await new Promise((resolve, reject) => {
console.log(`SELECT ${col} FROM ${table} ${whereConstructor.query(where, conect)}`);
db.all(`SELECT ${col} FROM ${table} ${whereConstructor.query(where, conect)}`, whereConstructor.placeHolders(where), function(err, rows) {
if (err) {reject(err);}
else {resolve(rows);}
if(err){reject(err);}else{resolve(rows);};
});
});
};

@@ -21,3 +21,3 @@ const select = require('./select');

originalData.forEach(row=>{
arrCase.push(`WHEN ROWID = ${row.rowid} THEN ?`);
arrCase.push(`WHEN ROWID = ${Object.keys(row)[0]} THEN ?`);
arrDataInsert.push(strngifyData(dataInsert(parseData(row[upCol]))));

@@ -33,4 +33,4 @@ })

placeHolders = [...placeHolders, ...whereConstructor.placeHolders(where)];
console.log(`UPDATE ${table} SET ${upArray.join(', ')} ${whereConstructor.query(where, conect)}`)
console.log(placeHolders);
//console.log(`UPDATE ${table} SET ${upArray.join(', ')} ${whereConstructor.query(where, conect)}`)
//console.log(placeHolders);
db.run(`UPDATE ${table} SET ${upArray.join(', ')} ${whereConstructor.query(where, conect)}`, placeHolders, function(err) {

@@ -37,0 +37,0 @@ if (err) {

{
"name": "sqlite-express",
"version": "2.0.10",
"version": "2.0.11",
"description": "functions for sqlite3",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -19,5 +19,2 @@ sqliteExpress = require('./index');

let hola = async()=>{
console.log(await sqliteExpress.select(ndb, 'noticias', '*', {nombre : 'pruebaMus'}))
}
hola()
sqliteExpress.update(ndb, 'noticias', {publicada : (x)=>{return !x}}, {nombre : 'pruebaMus'});

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc