@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.
package/dist/db/index.js CHANGED
@@ -22,14 +22,14 @@ import {
22
22
  userRef,
23
23
  uuid,
24
24
  vector
25
- } from "../chunk-7JSEN7UR.js";
25
+ } from "../chunk-G4R6BTLV.js";
26
26
  import {
27
27
  TxPlanError,
28
28
  TxRefError,
29
29
  dec,
30
30
  inc,
31
31
  now
32
- } from "../chunk-P2Q27SGP.js";
32
+ } from "../chunk-CJSKYY76.js";
33
33
  import "../chunk-7D4SUZUM.js";
34
34
  export {
35
35
  EXTENSION_DEPENDENCIES,
@@ -526,6 +526,20 @@ function makeTableProxy(ops, prefix) {
526
526
  findById: (id) => ops().findById(name, id),
527
527
  findMany: (query, opts) => ops().findMany(name, query, opts),
528
528
  upsert: (data, opts) => ops().upsert(name, data, opts),
529
+ // THREE VERBS THE TYPE PROMISED AND THIS PROXY DID NOT EMIT.
530
+ //
531
+ // `EnvTypedTableBase` declares `updateMany`, `deleteMany` and `count`
532
+ // (typed-db.ts) and the ops layer implements all three — only this
533
+ // proxy, which is what a handler actually touches, left them out. So
534
+ // the type said the verb exists, autocomplete offered it, and the call
535
+ // answered `undefined is not a function`.
536
+ //
537
+ // Older than this run, but the run rewrote this proxy for
538
+ // `Database.schema(name).tables.*` and would have carried the gap onto
539
+ // the new surface too.
540
+ updateMany: (where, set) => ops().updateMany(name, where, set),
541
+ deleteMany: (where) => ops().deleteMany(name, where),
542
+ count: (where) => ops().count(name, where),
529
543
  search: (params) => ops().search(name, params),
530
544
  similar: (id, params) => ops().similar(name, id, params),
531
545
  recommend: (params) => ops().recommend(name, params),
@@ -1127,6 +1141,11 @@ function assertUsableWriteValues(caller, table, cols, data) {
1127
1141
  }
1128
1142
  }
1129
1143
 
1144
+ // src/db/schema-json.ts
1145
+ function qualifiedTableKey(schemaName, tableName) {
1146
+ return schemaName === "" || schemaName === "public" ? tableName : `${schemaName}.${tableName}`;
1147
+ }
1148
+
1130
1149
  // src/engine/db.ts
1131
1150
  function quoteIdent(name) {
1132
1151
  return `"${name.replace(/"/g, '""')}"`;
@@ -2289,9 +2308,6 @@ function setSchema(schemas) {
2289
2308
  }
2290
2309
  currentSchema = { tables };
2291
2310
  }
2292
- function qualifiedTableKey(schema, table) {
2293
- return schema === "" || schema === "public" ? table : `${schema}.${table}`;
2294
- }
2295
2311
  function withTables(ops, schema = currentSchema) {
2296
2312
  const bind = (key) => ({
2297
2313
  insert: (data) => ops.insert(key, data),