sqlite-express
Advanced tools
Comparing version 2.0.8 to 2.0.9
@@ -9,3 +9,3 @@ const signs = require('./submodules/signos'); | ||
console.log(`SELECT ${col} FROM ${table} ${whereConstructor.query(where, conect)}`) | ||
db.all(`SELECT ${col} FROM ${table} ${where !== undefined || where !== null ? whereConstructor.query(where, conect) : ''}`, where !== undefined || where !== null ? whereConstructor.placeHolders(where) : [], function(err, rows) { | ||
db.all(`SELECT ${col} FROM ${table} ${whereConstructor.query(where, conect)}`, whereConstructor.placeHolders(where), function(err, rows) { | ||
if (err) {reject(err);} | ||
@@ -12,0 +12,0 @@ else {resolve(rows);} |
@@ -16,3 +16,7 @@ const is = require('./is'); | ||
} | ||
return `WHERE ${armarCondicion(where, conect, [])}`; | ||
if(where === undefined || where === null){ | ||
return ''; | ||
}else{ | ||
return `WHERE ${armarCondicion(where, conect, [])}`; | ||
} | ||
}, | ||
@@ -27,4 +31,8 @@ placeHolders : (where)=>{ | ||
} | ||
return plaseHoldersOrdenados(where); | ||
if(where === undefined || where === null){ | ||
return []; | ||
}else{ | ||
return plaseHoldersOrdenados(where); | ||
} | ||
} | ||
} |
{ | ||
"name": "sqlite-express", | ||
"version": "2.0.8", | ||
"version": "2.0.9", | ||
"description": "functions for sqlite3", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -16,2 +16,7 @@ sqliteExpress = require('./index'); | ||
sqliteExpress.update(db, 'personas', {ciudad : (x)=>{return [...x, 'londres']}, edad : (x)=>{return (x + 100)}}, {nombre : 'Gabriel', OR : {edad : 30, ciudad : 'hola'}}); | ||
//sqliteExpress.update(db, 'personas', {ciudad : (x)=>{return [...x, 'londres']}, edad : (x)=>{return (x + 100)}}, {nombre : 'Gabriel', OR : {edad : 30, ciudad : 'hola'}}); | ||
let hola = async()=>{ | ||
console.log(await sqliteExpress.select(db, 'personas', '*')) | ||
} | ||
hola() |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24116
192