postgresdk 0.18.12 → 0.18.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -5818,7 +5818,8 @@ export async function createRecord(
5818
5818
  RETURNING \${returningClause}\`;
5819
5819
 
5820
5820
  const preparedVals = vals.map((v, i) =>
5821
- v !== null && v !== undefined && typeof v === 'object' && ctx.jsonbColumns?.includes(cols[i])
5821
+ v !== null && v !== undefined && typeof v === 'object' &&
5822
+ (ctx.jsonbColumns?.includes(cols[i]) || ctx.vectorColumns?.includes(cols[i]))
5822
5823
  ? JSON.stringify(v)
5823
5824
  : v
5824
5825
  );
@@ -6338,7 +6339,8 @@ export async function updateRecord(
6338
6339
  const returningClause = buildColumnList(ctx.select, ctx.exclude, ctx.allColumnNames);
6339
6340
  const text = \`UPDATE "\${ctx.table}" SET \${setSql} WHERE \${wherePkSql} RETURNING \${returningClause}\`;
6340
6341
  const updateVals = Object.entries(filteredData).map(([col, v]) =>
6341
- v !== null && v !== undefined && typeof v === 'object' && ctx.jsonbColumns?.includes(col)
6342
+ v !== null && v !== undefined && typeof v === 'object' &&
6343
+ (ctx.jsonbColumns?.includes(col) || ctx.vectorColumns?.includes(col))
6342
6344
  ? JSON.stringify(v)
6343
6345
  : v
6344
6346
  );
package/dist/index.js CHANGED
@@ -4857,7 +4857,8 @@ export async function createRecord(
4857
4857
  RETURNING \${returningClause}\`;
4858
4858
 
4859
4859
  const preparedVals = vals.map((v, i) =>
4860
- v !== null && v !== undefined && typeof v === 'object' && ctx.jsonbColumns?.includes(cols[i])
4860
+ v !== null && v !== undefined && typeof v === 'object' &&
4861
+ (ctx.jsonbColumns?.includes(cols[i]) || ctx.vectorColumns?.includes(cols[i]))
4861
4862
  ? JSON.stringify(v)
4862
4863
  : v
4863
4864
  );
@@ -5377,7 +5378,8 @@ export async function updateRecord(
5377
5378
  const returningClause = buildColumnList(ctx.select, ctx.exclude, ctx.allColumnNames);
5378
5379
  const text = \`UPDATE "\${ctx.table}" SET \${setSql} WHERE \${wherePkSql} RETURNING \${returningClause}\`;
5379
5380
  const updateVals = Object.entries(filteredData).map(([col, v]) =>
5380
- v !== null && v !== undefined && typeof v === 'object' && ctx.jsonbColumns?.includes(col)
5381
+ v !== null && v !== undefined && typeof v === 'object' &&
5382
+ (ctx.jsonbColumns?.includes(col) || ctx.vectorColumns?.includes(col))
5381
5383
  ? JSON.stringify(v)
5382
5384
  : v
5383
5385
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postgresdk",
3
- "version": "0.18.12",
3
+ "version": "0.18.13",
4
4
  "description": "Generate a typed server/client SDK from a Postgres schema (includes, Zod, Hono).",
5
5
  "type": "module",
6
6
  "bin": {