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.mjs CHANGED
@@ -6915,7 +6915,7 @@ const pushIn = (ctx, query, ands, quotedAs, arg) => {
6915
6915
  const columnsSql = arg.columns.map((column) => columnToSql(ctx, query, query.shape, column, quotedAs)).join(", ");
6916
6916
  ands.push(`${multiple ? `(${columnsSql})` : columnsSql} IN ${value}`);
6917
6917
  };
6918
- const MAX_BINDING_PARAMS = 65536;
6918
+ const MAX_BINDING_PARAMS = 65533;
6919
6919
  const makeInsertSql = (ctx, q, query, quotedAs, isSubSql) => {
6920
6920
  let { columns } = query;
6921
6921
  const { shape, hookCreateSet } = query;
@@ -6990,8 +6990,8 @@ const makeInsertSql = (ctx, q, query, quotedAs, isSubSql) => {
6990
6990
  let encodedRow = encodeRow(ctx, ctxValues, QueryClass, values[i], runtimeDefaults, quotedAs, hookSetSql);
6991
6991
  ctx.skipBatchCheck = skipBatchCheck;
6992
6992
  if (!upsert) encodedRow = "(" + encodedRow + ")";
6993
- if (ctxValues.length > 65536) {
6994
- if (ctxValues.length - currentValuesLen > 65536) throw new Error(`Too many parameters for a single insert row, max is ${MAX_BINDING_PARAMS}`);
6993
+ if (ctxValues.length > 65533) {
6994
+ if (ctxValues.length - currentValuesLen > 65533) throw new Error(`Too many parameters for a single insert row, max is ${MAX_BINDING_PARAMS}`);
6995
6995
  if (!skipBatchCheck) {
6996
6996
  setTopCteSize(ctx, topCteSize);
6997
6997
  applySqlState(sqlState);