@procedures/mongo 0.36.0 → 0.38.0

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.
@@ -23,7 +23,7 @@
23
23
  import type { Collection, Db, Document, ObjectId } from "mongodb";
24
24
  import type { CollectionStorage, StorageMetadata } from "@procedures/collections";
25
25
  import { ensureConnection } from "../connection.js";
26
- import { partitionTargetId, viewFilter, VIEW_GENERATION_FIELD, VIEW_HASH_FIELD, type MaterializedView, type MaterializedViewStatus, type ViewTargetId } from "./materializer.js";
26
+ import { defaultRowId, partitionTargetId, viewFilter, VIEW_GENERATION_FIELD, VIEW_HASH_FIELD, type MaterializedView, type MaterializedViewStatus, type ViewTargetId } from "./materializer.js";
27
27
 
28
28
  /** The options of a `MongoViewStorage`. Give the same names as to the `ViewMaterializer` of the view. */
29
29
  export interface MongoViewStorageOptions {
@@ -58,11 +58,6 @@ interface Generation {
58
58
  readonly generation: ObjectId;
59
59
  }
60
60
 
61
- /** The `_id` of a row in the result, from the stored `_id` of `partitionTargetId`. */
62
- function defaultRowId(storedId: unknown): unknown {
63
- return typeof storedId === "object" && storedId !== null && "id" in storedId ? (storedId as { id: unknown }).id : storedId;
64
- }
65
-
66
61
  /**
67
62
  * A read-only `CollectionStorage` over the target of one materialized view (roadmap CLI-38). Each
68
63
  * read gives the rows of the current generation of the view only.