pqb 0.66.2 → 0.66.3

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/index.js CHANGED
@@ -6938,7 +6938,7 @@ const pushIn = (ctx, query, ands, quotedAs, arg) => {
6938
6938
  const columnsSql = arg.columns.map((column) => columnToSql(ctx, query, query.shape, column, quotedAs)).join(", ");
6939
6939
  ands.push(`${multiple ? `(${columnsSql})` : columnsSql} IN ${value}`);
6940
6940
  };
6941
- const MAX_BINDING_PARAMS = 65536;
6941
+ const MAX_BINDING_PARAMS = 65533;
6942
6942
  const makeInsertSql = (ctx, q, query, quotedAs, isSubSql) => {
6943
6943
  let { columns } = query;
6944
6944
  const { shape, hookCreateSet } = query;
@@ -7013,8 +7013,8 @@ const makeInsertSql = (ctx, q, query, quotedAs, isSubSql) => {
7013
7013
  let encodedRow = encodeRow(ctx, ctxValues, QueryClass, values[i], runtimeDefaults, quotedAs, hookSetSql);
7014
7014
  ctx.skipBatchCheck = skipBatchCheck;
7015
7015
  if (!upsert) encodedRow = "(" + encodedRow + ")";
7016
- if (ctxValues.length > 65536) {
7017
- if (ctxValues.length - currentValuesLen > 65536) throw new Error(`Too many parameters for a single insert row, max is ${MAX_BINDING_PARAMS}`);
7016
+ if (ctxValues.length > 65533) {
7017
+ if (ctxValues.length - currentValuesLen > 65533) throw new Error(`Too many parameters for a single insert row, max is ${MAX_BINDING_PARAMS}`);
7018
7018
  if (!skipBatchCheck) {
7019
7019
  setTopCteSize(ctx, topCteSize);
7020
7020
  applySqlState(sqlState);