Skip to content

Commit d37d6cd

Browse files
tiny error message added.
1 parent 0eb8706 commit d37d6cd

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "puddysql",
33
"description": "🍮 Powerful SQL toolkit for Node.js, built with flexibility and structure in mind. Easily manage SQLite3/PostgreSQL, advanced queries, smart tag systems, and full JSON-friendly filters.",
4-
"version": "1.0.0-beta-3",
4+
"version": "1.0.0-beta-4",
55
"main": "./dist/index.cjs",
66
"module": "./dist/index.mjs",
77
"types": "./dist/index.d.mts",

src/PuddySqlQuery.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,6 +1466,7 @@ class PuddySqlQuery {
14661466
*/
14671467
escapeValuesFix(v, name) {
14681468
const column = this.#table?.[name];
1469+
if(!isJsonObject(column)) throw new Error(`Column "${name}" does not exist in the table definition.`);
14691470
const type = column.type ?? '';
14701471
const func = this.#jsonEscapeFix[type];
14711472
if (typeof func !== 'function') return v;

0 commit comments

Comments
 (0)