@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.
@@ -16,10 +16,10 @@ import {
16
16
  quoteIdent,
17
17
  scrubSecrets,
18
18
  withTables
19
- } from "../chunk-WH2EV2LT.js";
20
- import "../chunk-XJ2RSHEU.js";
19
+ } from "../chunk-AILPKEK5.js";
20
+ import "../chunk-CRQKCRGF.js";
21
21
  import "../chunk-XABBC7JP.js";
22
- import "../chunk-P2Q27SGP.js";
22
+ import "../chunk-CJSKYY76.js";
23
23
  import "../chunk-35PNTIRN.js";
24
24
  import "../chunk-7D4SUZUM.js";
25
25
  export {
package/dist/index.cjs CHANGED
@@ -665,6 +665,20 @@ function makeTableProxy(ops, prefix) {
665
665
  findById: (id) => ops().findById(name, id),
666
666
  findMany: (query, opts) => ops().findMany(name, query, opts),
667
667
  upsert: (data, opts) => ops().upsert(name, data, opts),
668
+ // THREE VERBS THE TYPE PROMISED AND THIS PROXY DID NOT EMIT.
669
+ //
670
+ // `EnvTypedTableBase` declares `updateMany`, `deleteMany` and `count`
671
+ // (typed-db.ts) and the ops layer implements all three — only this
672
+ // proxy, which is what a handler actually touches, left them out. So
673
+ // the type said the verb exists, autocomplete offered it, and the call
674
+ // answered `undefined is not a function`.
675
+ //
676
+ // Older than this run, but the run rewrote this proxy for
677
+ // `Database.schema(name).tables.*` and would have carried the gap onto
678
+ // the new surface too.
679
+ updateMany: (where, set) => ops().updateMany(name, where, set),
680
+ deleteMany: (where) => ops().deleteMany(name, where),
681
+ count: (where) => ops().count(name, where),
668
682
  search: (params) => ops().search(name, params),
669
683
  similar: (id, params) => ops().similar(name, id, params),
670
684
  recommend: (params) => ops().recommend(name, params),
@@ -1843,7 +1857,7 @@ function tableToJSON(table, schemaName) {
1843
1857
  return out;
1844
1858
  }
1845
1859
  function qualifiedTableKey(schemaName, tableName) {
1846
- return schemaName === "public" ? tableName : `${schemaName}.${tableName}`;
1860
+ return schemaName === "" || schemaName === "public" ? tableName : `${schemaName}.${tableName}`;
1847
1861
  }
1848
1862
  function toSchemaJSON(schemas) {
1849
1863
  const tables = {};