jeep-sqlite
Advanced tools
Comparing version 2.4.0 to 2.4.1
@@ -180,2 +180,5 @@ import { UtilsSQLite } from "./utils-sqlite"; | ||
const t2Names = colNames.map((name) => `t2.${name}`); | ||
console.log(" whStmt ", whStmt); | ||
console.log(" t1Names ", t1Names); | ||
console.log(" t2Names ", t2Names); | ||
try { | ||
@@ -189,2 +192,3 @@ // addPrefix to the whereClause and swap colNames with withRefsNames | ||
} | ||
console.log(" whereClause ", whereClause); | ||
const resultString = t1Names | ||
@@ -196,2 +200,3 @@ .map((t1, index) => `${t1} = ${t2Names[index]}`) | ||
`WHERE ${whereClause} AND t1.sql_deleted = 0;`; | ||
console.log(" sql ", sql); | ||
const vals = await UtilsSQLite.queryAll(mDB, sql, values); | ||
@@ -225,5 +230,5 @@ if (vals.length > 0) { | ||
} | ||
setStmt += 'sql_deleted = 0,'; | ||
const curTime = UtilsDelete.getCurrentTimeAsInteger() + 5; | ||
setStmt += `last_modified = ${curTime}`; | ||
setStmt += 'sql_deleted = 0'; | ||
// const curTime = UtilsDelete.getCurrentTimeAsInteger() + 5; | ||
// setStmt += `last_modified = ${curTime}`; | ||
// Create the where statement | ||
@@ -230,0 +235,0 @@ uWhereStmt = `WHERE ${key} IN (`; |
@@ -22,5 +22,13 @@ class UtilsSQLStatement { | ||
let columnValuePairs; | ||
// Split the WHERE clause based on the "AND" keyword | ||
const subSequenceArray = whereClause.split("AND"); | ||
columnValuePairs = subSequenceArray.map((pair) => pair.trim()); | ||
if (whereClause.includes("AND")) { | ||
// Split the WHERE clause based on the "AND" keyword | ||
const subSequenceArray = whereClause.split("AND"); | ||
console.log(" whereClause", whereClause); | ||
console.log(" subSequenceArray", subSequenceArray); | ||
columnValuePairs = subSequenceArray.map((pair) => pair.trim()); | ||
} | ||
else { | ||
columnValuePairs = [whereClause]; | ||
} | ||
console.log(" columnValuePairs", columnValuePairs); | ||
const modifiedPairs = columnValuePairs.map((pair) => { | ||
@@ -27,0 +35,0 @@ const match = pair.match(/(\w+)\s*(=|IN|BETWEEN|LIKE)\s*(.+)/); |
@@ -1,2 +0,2 @@ | ||
import{p as e,b as t}from"./p-68f52286.js";export{s as setNonce}from"./p-68f52286.js";const o=()=>{const t=import.meta.url;const s={};if(t!==""){s.resourcesUrl=new URL(".",t).href}return e(s)};o().then((e=>t([["p-d6900b29",[[1,"jeep-sqlite",{autoSave:[516,"autosave"],wasmPath:[513,"wasmpath"],pickText:[513,"picktext"],saveText:[513,"savetext"],buttonOptions:[513,"buttonoptions"],innerAutoSave:[32],innerWasmPath:[32],innerPickText:[32],innerSaveText:[32],innerButtonOptions:[32],echo:[64],createConnection:[64],isConnection:[64],closeConnection:[64],open:[64],close:[64],getVersion:[64],execute:[64],executeSet:[64],run:[64],query:[64],getTableList:[64],isDBExists:[64],isDBOpen:[64],deleteDatabase:[64],isStoreOpen:[64],copyFromAssets:[64],isTableExists:[64],createSyncTable:[64],getSyncDate:[64],setSyncDate:[64],isJsonValid:[64],importFromJson:[64],exportToJson:[64],deleteExportedRows:[64],addUpgradeStatement:[64],isDatabase:[64],getDatabaseList:[64],checkConnectionsConsistency:[64],saveToStore:[64],saveToLocalDisk:[64],getFromLocalDiskToStore:[64],getFromHTTPRequest:[64]}]]]],e))); | ||
import{p as e,b as t}from"./p-68f52286.js";export{s as setNonce}from"./p-68f52286.js";const o=()=>{const t=import.meta.url;const s={};if(t!==""){s.resourcesUrl=new URL(".",t).href}return e(s)};o().then((e=>t([["p-4e946535",[[1,"jeep-sqlite",{autoSave:[516,"autosave"],wasmPath:[513,"wasmpath"],pickText:[513,"picktext"],saveText:[513,"savetext"],buttonOptions:[513,"buttonoptions"],innerAutoSave:[32],innerWasmPath:[32],innerPickText:[32],innerSaveText:[32],innerButtonOptions:[32],echo:[64],createConnection:[64],isConnection:[64],closeConnection:[64],open:[64],close:[64],getVersion:[64],execute:[64],executeSet:[64],run:[64],query:[64],getTableList:[64],isDBExists:[64],isDBOpen:[64],deleteDatabase:[64],isStoreOpen:[64],copyFromAssets:[64],isTableExists:[64],createSyncTable:[64],getSyncDate:[64],setSyncDate:[64],isJsonValid:[64],importFromJson:[64],exportToJson:[64],deleteExportedRows:[64],addUpgradeStatement:[64],isDatabase:[64],getDatabaseList:[64],checkConnectionsConsistency:[64],saveToStore:[64],saveToLocalDisk:[64],getFromLocalDiskToStore:[64],getFromHTTPRequest:[64]}]]]],e))); | ||
//# sourceMappingURL=jeep-sqlite.esm.js.map |
{ | ||
"name": "jeep-sqlite", | ||
"version": "2.4.0", | ||
"version": "2.4.1", | ||
"description": "Browser SQLite Stencil Component", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
7805446
43997