@palbase/backend 25.0.3 → 25.0.4

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.
@@ -492,6 +492,20 @@ function makeTableProxy(ops, prefix) {
492
492
  findById: (id) => ops().findById(name, id),
493
493
  findMany: (query, opts) => ops().findMany(name, query, opts),
494
494
  upsert: (data, opts) => ops().upsert(name, data, opts),
495
+ // THREE VERBS THE TYPE PROMISED AND THIS PROXY DID NOT EMIT.
496
+ //
497
+ // `EnvTypedTableBase` declares `updateMany`, `deleteMany` and `count`
498
+ // (typed-db.ts) and the ops layer implements all three — only this
499
+ // proxy, which is what a handler actually touches, left them out. So
500
+ // the type said the verb exists, autocomplete offered it, and the call
501
+ // answered `undefined is not a function`.
502
+ //
503
+ // Older than this run, but the run rewrote this proxy for
504
+ // `Database.schema(name).tables.*` and would have carried the gap onto
505
+ // the new surface too.
506
+ updateMany: (where, set) => ops().updateMany(name, where, set),
507
+ deleteMany: (where) => ops().deleteMany(name, where),
508
+ count: (where) => ops().count(name, where),
495
509
  search: (params) => ops().search(name, params),
496
510
  similar: (id, params) => ops().similar(name, id, params),
497
511
  recommend: (params) => ops().recommend(name, params),
@@ -1093,6 +1107,11 @@ function assertUsableWriteValues(caller, table, cols, data) {
1093
1107
  }
1094
1108
  }
1095
1109
 
1110
+ // src/db/schema-json.ts
1111
+ function qualifiedTableKey(schemaName, tableName) {
1112
+ return schemaName === "" || schemaName === "public" ? tableName : `${schemaName}.${tableName}`;
1113
+ }
1114
+
1096
1115
  // src/engine/db.ts
1097
1116
  function quoteIdent(name) {
1098
1117
  return `"${name.replace(/"/g, '""')}"`;
@@ -2255,9 +2274,6 @@ function setSchema(schemas) {
2255
2274
  }
2256
2275
  currentSchema = { tables };
2257
2276
  }
2258
- function qualifiedTableKey(schema, table) {
2259
- return schema === "" || schema === "public" ? table : `${schema}.${table}`;
2260
- }
2261
2277
  function withTables(ops, schema = currentSchema) {
2262
2278
  const bind = (key) => ({
2263
2279
  insert: (data) => ops.insert(key, data),