From 057dfdb2de9654060e5688e032455dcb03c77f51 Mon Sep 17 00:00:00 2001 From: R-Rajaneesh Date: Sun, 18 Dec 2022 18:46:10 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5feat:=20v1.0.4=20(only=20@quipodb/s?= =?UTF-8?q?qlite)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/sqlite/dist/index.js | 2 +- packages/sqlite/index.ts | 2 +- packages/sqlite/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/sqlite/dist/index.js b/packages/sqlite/dist/index.js index 38cf2d1..7038de5 100644 --- a/packages/sqlite/dist/index.js +++ b/packages/sqlite/dist/index.js @@ -154,7 +154,7 @@ class Sqlite { const args = KEYS.map((v, i) => (v += ` = (?)`)).join(", "); const Data = refData[`${this.options.primaryKey}`] ? refData : this.getDocProvider(collectionName, refData); try { - this.sqlite.prepare(`UPDATE ${collectionName} SET ${args} WHERE ${this.options.primaryKey} = (?)`).run(VALUES, Data[`${this.options.primaryKey}`]); + this.sqlite.prepare(`UPDATE ${collectionName} SET ${args} WHERE ${this.options.primaryKey} = (?)`).run(VALUES, JSON.stringify(Data[`${this.options.primaryKey}`])); } catch (error) { if (this.options.dev) diff --git a/packages/sqlite/index.ts b/packages/sqlite/index.ts index 691c376..2ab92ef 100644 --- a/packages/sqlite/index.ts +++ b/packages/sqlite/index.ts @@ -145,7 +145,7 @@ class Sqlite { const args = KEYS.map((v, i) => (v += ` = (?)`)).join(", "); const Data = refData[`${this.options.primaryKey}`] ? refData : this.getDocProvider(collectionName, refData); try { - this.sqlite.prepare(`UPDATE ${collectionName} SET ${args} WHERE ${this.options.primaryKey} = (?)`).run(VALUES, Data[`${this.options.primaryKey}`]); + this.sqlite.prepare(`UPDATE ${collectionName} SET ${args} WHERE ${this.options.primaryKey} = (?)`).run(VALUES, JSON.stringify(Data[`${this.options.primaryKey}`])); } catch (error) { if (this.options.dev) console.log(error); } diff --git a/packages/sqlite/package.json b/packages/sqlite/package.json index 7a21613..495f0e9 100644 --- a/packages/sqlite/package.json +++ b/packages/sqlite/package.json @@ -1 +1 @@ -{"name":"@quipodb/sqlite","version":"1.0.3","description":"Sqlite provider for this package","type":"module","main":"./dist/index.js","typings":"./dist/index.d.ts","scripts":{"build":"tsc index.ts -t esnext -m esnext -d --allowSyntheticDefaultImports --moduleResolution node --outDir ./dist","publish-beta-public":"npm publish --tag beta --registry=https://registry.npmjs.com","publish-beta-private":"npm publish --tag beta","publish-public":"npm publish --registry=https://registry.npmjs.com --access public","publish-private":"npm publish"},"keywords":["sqlite","quipodb","db","database","provider"],"author":{"name":"Rajaneesh R","email":"rajaneeshr@proton.me","url":"https://r-rajaneesh.vercel.app"},"license":"ISC","dependencies":{"better-sqlite3":"^7.6.2","fs-extra":"^10.1.0"},"devDependencies":{"@types/better-sqlite3":"^7.6.0","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.182","@types/node":"^18.6.1","typescript":"^4.8.3"}} +{"name":"@quipodb/sqlite","version":"1.0.4","description":"Sqlite provider for this package","type":"module","main":"./dist/index.js","typings":"./dist/index.d.ts","scripts":{"build":"tsc index.ts -t esnext -m esnext -d --allowSyntheticDefaultImports --moduleResolution node --outDir ./dist","publish-beta-public":"npm publish --tag beta --registry=https://registry.npmjs.com","publish-beta-private":"npm publish --tag beta","publish-public":"npm publish --registry=https://registry.npmjs.com --access public","publish-private":"npm publish"},"keywords":["sqlite","quipodb","db","database","provider"],"author":{"name":"Rajaneesh R","email":"rajaneeshr@proton.me","url":"https://r-rajaneesh.vercel.app"},"license":"ISC","dependencies":{"better-sqlite3":"^7.6.2","fs-extra":"^10.1.0"},"devDependencies":{"@types/better-sqlite3":"^7.6.0","@types/fs-extra":"^9.0.13","@types/lodash":"^4.14.182","@types/node":"^18.6.1","typescript":"^4.8.3"}}